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
8 changes: 6 additions & 2 deletions .github/workflows/release-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ jobs:
}
EOF
(cd archives && sha256sum * > SHA256SUMS && cat SHA256SUMS)
- name: Stage the checked tarball on npm for the maintainer to approve
# The `./` makes npm read a file path. Without it, npm reads
# `npm-tarball/<file>` as a GitHub repository and refuses to fetch it.
run: npm stage publish "./npm-tarball/$(node -p "require('./npm-tarball/pack-summary.json').tarball")"
# Tag only after the package is staged. A failed staging then leaves no
# tag, so a fixed workflow can release the same version from a new commit.
- name: Tag the tested commit
if: github.ref_type != 'tag'
env:
Expand Down Expand Up @@ -200,8 +206,6 @@ jobs:
echo "::error::$TAG already names commit $existing."
exit 1
fi
- name: Stage the checked tarball on npm for the maintainer to approve
run: npm stage publish "npm-tarball/$(node -p "require('./npm-tarball/pack-summary.json').tarball")"
- name: Publish the checked archives as the GitHub release
env:
GH_TOKEN: ${{ github.token }}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,28 @@ jobs:
path: npm-tarball
if-no-files-found: error

# The release stages this tarball with `npm stage publish` (D251). This job
# runs the same command with `--dry-run`, with the same Node and npm, so a
# command that cannot read the file fails here, before a release tags anything.
# Keep the command the same as the staging step in release-cross-platform.yml.
# This job holds no npm credential and sends nothing to npm.
npm-stage-dry-run:
name: npm stage (dry run)
needs: npm-pack
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 24
- name: Use the npm the release uses
run: npm install -g npm@12 && npm --version
- uses: actions/download-artifact@v4
with:
name: npm-tarball
path: npm-tarball
- name: Stage the checked tarball without sending it
run: npm stage publish --dry-run "./npm-tarball/$(node -p "require('./npm-tarball/pack-summary.json').tarball")"

# Each system installs the same packed tarball into an empty folder. Only the
# smoke scripts are checked out; the source tree and build tools stay out of reach.
npm-smoke:
Expand Down
Loading