Skip to content

Commit c9a4b22

Browse files
authored
chore: allow publishing prereleases (#295)
1 parent 7e2b1a9 commit c9a4b22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: Publish to npm
55

66
on:
77
release:
8-
types: [created]
8+
types: [published]
99

1010
jobs:
1111
build:
@@ -35,6 +35,11 @@ jobs:
3535
- run: npm version ${TAG_NAME} --git-tag-version=false
3636
env:
3737
TAG_NAME: ${{ github.ref_name }}
38+
- run: npm publish --provenance --access public --tag next
39+
if: "github.event.release.prerelease"
40+
env:
41+
NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}
3842
- run: npm publish --provenance --access public
43+
if: "!github.event.release.prerelease"
3944
env:
4045
NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}

0 commit comments

Comments
 (0)