mirror of
https://github.com/Drop-OSS/droplet.git
synced 2025-11-25 14:11:18 +10:00
multi platform build
This commit is contained in:
@ -2,16 +2,42 @@ stages:
|
||||
- build
|
||||
- publish
|
||||
|
||||
build:
|
||||
linux-build:
|
||||
stage: build
|
||||
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rust:1.81.0-bookworm
|
||||
script:
|
||||
- rustup toolchain install stable-x86_64-unknown-linux-gnu
|
||||
- apt-get update -y
|
||||
- apt-get install yarnpkg -y
|
||||
- yarnpkg
|
||||
- yarnpkg build
|
||||
- yarnpkg build --target x86_64-unknown-linux-gnu
|
||||
artifacts:
|
||||
paths:
|
||||
- index.js
|
||||
- index.d.ts
|
||||
- droplet.*.node
|
||||
|
||||
windows-build:
|
||||
stage: build
|
||||
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/rust:1.81.0-bookworm
|
||||
script:
|
||||
- rustup toolchain install stable-x86_64-pc-windows-msvc
|
||||
- apt-get update -y
|
||||
- apt-get install yarnpkg -y
|
||||
- yarnpkg
|
||||
- yarnpkg build --target x86_64-pc-windows-msvc
|
||||
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 "@drop:registry=https://${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/" > .npmrc
|
||||
- echo "//${CI_SERVER_HOST}/api/v4/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=${CI_JOB_TOKEN}" >> .npmrc
|
||||
- yarn publish
|
||||
@ -27,5 +27,10 @@
|
||||
"universal": "napi universal",
|
||||
"version": "napi version"
|
||||
},
|
||||
"packageManager": "yarn@4.5.0"
|
||||
"packageManager": "yarn@4.5.0",
|
||||
"optionalDependencies": {
|
||||
"@drop/droplet-win32-x64-msvc": "0.0.0",
|
||||
"@drop/droplet-darwin-x64": "0.0.0",
|
||||
"@drop/droplet-linux-x64-gnu": "0.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user