Skip to content
Open
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
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# This workflow will publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages

name: Publish package to NPM repository
name: Publish package to npmjs registry
on:
release:
types: [created]
types: [published]

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
ref: ${{ github.event.release.tag_name }}
- uses: actions/setup-node@v4
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: "22.x"
registry-url: "https://registry.npmjs.org"
node-version: 24
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci
- run: npm run build-ts
- run: npm publish --tag latest --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update npm
run: npm install -g npm@latest
- name: Release
run: npm publish --access public --tag ${{ github.event.release.prerelease && 'beta' || 'latest' }}
Loading