mirror of
https://github.com/Drop-OSS/droplet.git
synced 2025-11-12 07:42:48 +10:00
42 lines
1021 B
YAML
42 lines
1021 B
YAML
stages:
|
|
- build
|
|
- publish
|
|
|
|
.parallel-config:
|
|
parallel:
|
|
matrix:
|
|
- TARGET:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-pc-windows-msvc
|
|
|
|
build:
|
|
stage: build
|
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rust:1.81.0-bookworm
|
|
extends:
|
|
- .parallel-config
|
|
script:
|
|
- rustup target add $TARGET
|
|
- rustup toolchain install stable-$TARGET
|
|
- cargo install cargo-xwin
|
|
- apt-get update -y
|
|
- apt-get install yarnpkg llvm clang -y
|
|
- yarnpkg
|
|
- yarnpkg build --target $TARGET
|
|
artifacts:
|
|
paths:
|
|
- index.js
|
|
- index.d.ts
|
|
- droplet.*.node
|
|
|
|
publish:
|
|
stage: publish
|
|
dependencies:
|
|
- build
|
|
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:21
|
|
script:
|
|
- echo "registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc
|
|
- npm config set "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken" ${CI_JOB_TOKEN}
|
|
- yarn
|
|
- yarn artifacts
|
|
- ls -R ./npm
|
|
- npm publish |