We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8b63cf commit 8cea776Copy full SHA for 8cea776
.github/workflows/publish.yml
@@ -1,7 +1,7 @@
1
name: Publish Package to npmjs
2
on:
3
release:
4
- types: [published]
+ types: [published, prereleased]
5
jobs:
6
build:
7
permissions:
@@ -29,6 +29,13 @@ jobs:
29
run: pnpm run build
30
31
- name: Publish to npm
32
- run: pnpm publish --access public --no-git-checks
+ run: |
33
+ if [ "${{ github.event.release.prerelease }}" == "true" ]; then
34
+ echo "Publishing as beta (pre-release)..."
35
+ pnpm publish --tag beta --access public --no-git-checks
36
+ else
37
+ echo "Publishing as normal release..."
38
+ pnpm publish --access public --no-git-checks
39
+ fi
40
env:
41
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
0 commit comments