Skip to content
Merged
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
21 changes: 15 additions & 6 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,22 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
# Must match the environment configured on the npm trusted publisher
environment: production
permissions:
contents: write # create the GitHub release
id-token: write # npm trusted publishing (OIDC)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: setup-node
uses: actions/setup-node@v2.5.1
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: https://registry.npmjs.org/
- id: upgrade-npm
# Trusted publishing needs npm >= 11.5.1; Node 22 bundles npm 10.
# Pinned so the release job is reproducible.
run: npm install -g npm@11.21.0 --ignore-scripts && npm --version
- id: build-and-analyse
env:
CHECKOUT_PROCESSING_CHANNEL_ID: ${{ secrets.IT_CHECKOUT_PROCESSING_CHANNEL_ID }}
Expand All @@ -43,9 +52,9 @@ jobs:
- id: print-version
run: echo "Releasing $CURRENT_VERSION"
- id: publish-to-npm
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
run: npm publish
# No token: npm exchanges the GitHub OIDC token with the registry
# and publishes with provenance.
run: npm publish --provenance --access public
- id: create-release
uses: actions/create-release@v1
env:
Expand Down
Loading