Skip to content

v1.0.0

v1.0.0 #2

name: Publish GitHub package
on:
workflow_dispatch:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Set version to release tag
shell: bash
id: define_tag
run: |
PACKAGE_VERSION=$(git describe --abbrev=0 --tags | sed 's/^v//')
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
- name: Build
run: npm run build
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}