Skip to content

Increase version number #17

Increase version number

Increase version number #17

Workflow file for this run

name: Publish to NPM
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: |
PACKAGE=$(cat package.json | jq -r .name)
VERSION=$(cat package.json | jq -r .version)
CURRENT_VERSION=$(npm view "$PACKAGE" version)
if [[ "$CURRENT_VERSION" != "$VERSION" ]]; then npm publish --provenance; fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}