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
31 changes: 10 additions & 21 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,30 @@ jobs:
publish_npm:
name: Publish to NPM
needs: release_and_brew
runs-on: blacksmith-4vcpu-ubuntu-2404
# npm trusted publishing currently requires a GitHub-hosted runner.
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set version
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
uses: actions/checkout@v6

- name: Check version
run: echo "Version ${{ github.event.client_payload.new-tag }}"

- name: Use Node.js 20
uses: actions/setup-node@v3
- name: Use Node.js 24
uses: actions/setup-node@v6
with:
node-version: 20
node-version: 24
registry-url: https://registry.npmjs.org/

- name: Setup Git user
run: |
git config --global user.name "pb33f github bot"
git config --global user.email "github-bot@pb33f.io"
- name: Create .npmrc file
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Bump NPM version
run: npm --no-git-tag-version --allow-same-version version ${{ github.event.client_payload.new-tag }}

- name: NPM publish
run: npm publish --access public
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public --provenance

push_to_registries:
name: Push Docker image to multiple registries
Expand Down
Loading