Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,18 @@ jobs:
node-version-file: .nvmrc
registry-url: "https://registry.npmjs.org"

- name: Render and build the launcher
# Build first, then render. The committed package.json and lockfile leave out the six
# platform packages, because a lockfile can't pin a version that hasn't been published:
# it would hold the previous release's version and `npm ci` would refuse it. The build
# only needs TypeScript. The render then adds the platform packages at this release's
# version, just before `npm publish`.
- name: Build and render the launcher
shell: bash
working-directory: packaging/npm/si
run: |
node ../scripts/render-main-package.cjs ./package.json "${RELEASE_VERSION}"
npm ci
npm run build
node ../scripts/render-main-package.cjs ./package.json "${RELEASE_VERSION}"

- name: Check whether the package version already exists on npm
id: npm-check
Expand Down
3 changes: 2 additions & 1 deletion packaging/npm/scripts/render-main-package.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ if (!outputPath || !version) {
}

// The platform binary packages the launcher resolves at runtime. Kept in lockstep with the
// release-npm.yml build matrix.
// release-npm.yml build matrix. They are only added here, at publish time, and never to the
// committed package.json or its lockfile (see the "Build and render the launcher" step).
const platformSuffixes = [
"darwin-arm64",
"darwin-x64",
Expand Down
26 changes: 0 additions & 26 deletions packaging/npm/si/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions packaging/npm/si/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,5 @@
"devDependencies": {
"@types/node": "^18.15.11",
"typescript": "^5.0.0"
},
"optionalDependencies": {
"@getsigit/si-darwin-arm64": "1.4.0",
"@getsigit/si-darwin-x64": "1.4.0",
"@getsigit/si-linux-arm64": "1.4.0",
"@getsigit/si-linux-x64": "1.4.0",
"@getsigit/si-windows-arm64": "1.4.0",
"@getsigit/si-windows-x64": "1.4.0"
}
}
Loading