Skip to content

v0.0.10

v0.0.10 #8

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Node.js Package
on:
release:
types: [created]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
# tests don't work yet
# - run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Configure Git
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Update version
run: |
git fetch
git checkout main
VERSION=${GITHUB_REF#refs/tags/}
npm version ${VERSION} --no-git-tag-version
git add package.json
git commit -m "Update version to ${VERSION}"
git push origin main
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}