build(ci): handle various release type on npm registry
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Oct 2024 17:08:48 +0000 (19:08 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 23 Oct 2024 17:08:48 +0000 (19:08 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
.github/workflows/release-please.yml

index 9097fa861a6a6175bbb23c71acf994529f9daba7..1c27eeefc996c9e08eafdbabae2bb78fafab65bb 100644 (file)
@@ -116,8 +116,8 @@ jobs:
         env:
           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
 
-      - name: Publish Pre-Release
-        if: ${{ contains(steps.package-version.outputs.version, '-') == true && contains(steps.package-version.outputs.version, '-beta') == false }}
+      - name: Publish Release Candidate
+        if: ${{ contains(steps.package-version.outputs.version, '-rc') == true }}
         run: pnpm publish --no-git-checks --tag next
         env:
           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -128,6 +128,12 @@ jobs:
         env:
           NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
 
+      - name: Publish Alpha Release
+        if: ${{ contains(steps.package-version.outputs.version, '-alpha') == true }}
+        run: pnpm publish --no-git-checks --tag alpha
+        env:
+          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+
   publish-documentation:
     needs: [publish-npm, publish-jsr]
     runs-on: ubuntu-latest