Skip to content

Release

Release #36

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: npm install and build
run: |
npm ci
npm run build
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
- name: Set version
id: set-version
run: |
REF=${{ github.ref }}
VERSION=${REF/refs\/tags\/v/}
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Draft Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true # Only publish after manual trigger