Skip to content

1.2.5

1.2.5 #3

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Version check
run: |
package_json_version=$(node -e 'console.log(require("./package.json").version)')
if [ "v$package_json_version" != $GITHUB_REF_NAME ]; then
echo "Version in package.json (v$package_json_version) does not match the tag ($GITHUB_REF_NAME)"
exit 1
fi
- name: Setup Node.js
uses: actions/setup-node@v3
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Build
run:
yarn install --frozen-lockfile --ignore-engines
yarn build
- name: Publish
run: npm publish --access=public