From 81db2cdd0369bc58c162e31f03f7889995c6bcba Mon Sep 17 00:00:00 2001 From: JaimeS98 Date: Wed, 29 Jul 2026 15:17:17 +1000 Subject: [PATCH 1/2] update the release workflow to allow doing prerelease --- .github/workflows/release.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0ea1c7c..380447f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,6 +34,17 @@ jobs: run: npm run prepack - name: Publish - run: npm publish + run: | + VERSION=$(node -p "require('./package.json').version") + + if [[ "$VERSION" == *"-alpha."* ]]; then + npm publish --tag alpha + elif [[ "$VERSION" == *"-beta."* ]]; then + npm publish --tag beta + elif [[ "$VERSION" == *"-rc."* ]]; then + npm publish --tag rc + else + npm publish + fi env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 172d0bad81730b966797361cd673536dba8e3e80 Mon Sep 17 00:00:00 2001 From: JaimeS98 Date: Wed, 29 Jul 2026 15:33:52 +1000 Subject: [PATCH 2/2] added manual input for the tag also --- .github/workflows/release.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 380447f..df8d6de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,11 @@ name: Publish Package to GitHub Packages on: workflow_dispatch: + inputs: + tag: + description: 'NPM tag to publish with (alpha, beta, rc, or leave empty for latest)' + required: false + default: '' release: types: [published] jobs: @@ -36,8 +41,11 @@ jobs: - name: Publish run: | VERSION=$(node -p "require('./package.json').version") + TAG="${{ github.event.inputs.tag }}" - if [[ "$VERSION" == *"-alpha."* ]]; then + if [[ -n "$TAG" ]]; then + npm publish --tag "$TAG" + elif [[ "$VERSION" == *"-alpha."* ]]; then npm publish --tag alpha elif [[ "$VERSION" == *"-beta."* ]]; then npm publish --tag beta