Skip to content

0.0.21

0.0.21 #25

Workflow file for this run

name: Publish to NPM
on:
workflow_dispatch:
release:
types: [published]
permissions:
id-token: write
jobs:
publish:
name: 'Publish ${{ github.ref_name }}'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- name: Extract tag name
id: get_tag
env:
VERSION: ${{ github.ref_name }}
run: |
# Check if it's beta
if [[ "$VERSION" == *-beta* ]]; then
echo "NPM_TAG=beta" >> $GITHUB_OUTPUT
echo "::notice title=Beta release::"
else
echo "NPM_TAG=latest" >> $GITHUB_OUTPUT
echo "::notice title=Stable Release::"
fi
- name: Publish to NPM
env:
VERSION: ${{ github.ref_name }}
run: |
npm ci
npm run package
npm version $VERSION --no-git-tag-version
npm publish --tag ${{ steps.get_tag.outputs.NPM_TAG }}