Skip to content

1.0.0

1.0.0 #10

Workflow file for this run

name: Publish Package
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# 1. Checkout repo
- uses: actions/checkout@v4
# 2. Setup Node.js
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
# 3. Install dependencies
- name: Install dependencies
run: npm ci
# 4. Build package
- name: Build package
run: npm run build
# 5. Run tests
- name: Run tests
run: npm test
# 6. Publish package (only on tags)
- name: Publish package
if: startsWith(github.ref, 'refs/tags/v')
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}