🚀 Add prerelease tag handling and update Node.js/pnpm versions in workflows.

This commit is contained in:
2026-02-08 22:36:26 +01:00
parent 10c156ffdb
commit f72676b535
2 changed files with 12 additions and 8 deletions

View File

@@ -36,6 +36,15 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing version: $VERSION"
if [[ $VERSION =~ - ]]; then
TAG=$(echo $VERSION | sed -E 's/.*-([^.]+).*/\1/')
echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "Prerelease detected, using tag: $TAG"
else
echo "tag=latest" >> $GITHUB_OUTPUT
echo "Stable release, using tag: latest"
fi
- name: Update package.json version
run: |
pnpm version ${{ steps.version.outputs.version }} --no-git-tag-version
@@ -43,10 +52,5 @@ jobs:
- name: Build package
run: pnpm build
- name: Set publishing auth config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish to NPM
run: pnpm publish --access public --provenance --no-git-checks
run: pnpm publish --access public --provenance --no-git-checks --tag ${{ steps.version.outputs.tag }}

View File

@@ -31,12 +31,12 @@ jobs:
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '24'
cache: 'pnpm'
- name: Install dependencies