Skip to content

Merge pull request #20 from biaov/release/v1.6.0 #5

Merge pull request #20 from biaov/release/v1.6.0

Merge pull request #20 from biaov/release/v1.6.0 #5

Workflow file for this run

name: Publish Package to npmjs
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.12.x'
registry-url: 'https://registry.npmjs.org'
- run: npm i
- run: npm run build
- run: |
VERSION=$(node -p "require('./package.json').version")
cd dist
if [[ "$VERSION" == *"beta"* ]]; then
npm publish --tag=beta
else
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}