Skip to content

0.3.0

0.3.0 #5

Workflow file for this run

name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }} # Use your PAT here!
- uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- run: npm ci
- name: Set version from tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
TAG=${GITHUB_REF#refs/tags/}
TAG=${TAG#v}
git fetch origin main
git checkout main
git pull
npm version $TAG --no-git-tag-version
git add package.json package-lock.json
git commit -m "ci: set version to $TAG [skip ci]" || true
git push origin main
- run: npm run build --if-present
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}