From f72676b5352af7d2cdebd6102f0e1fc20da0c64a Mon Sep 17 00:00:00 2001 From: Paillat-dev Date: Sun, 8 Feb 2026 22:36:26 +0100 Subject: [PATCH] :rocket: Add prerelease tag handling and update Node.js/pnpm versions in workflows. --- .github/workflows/publish.yaml | 16 ++++++++++------ .github/workflows/quality.yaml | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8ddb190..c5eca8f 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -35,6 +35,15 @@ jobs: VERSION=${GITHUB_REF#refs/tags/v} 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: | @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 453f68f..c3f82a4 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -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