Skip to content

Commit b708324

Browse files
authored
Merge pull request #1187 from brendandburns/release
Add pre-release option to gh action workflow.
2 parents 38cd517 + 8806b10 commit b708324

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ on:
1212
required: true
1313
default: false
1414
description: Dry run, will not push branches or upload the artifacts.
15+
pre_release:
16+
type: boolean
17+
required: true
18+
default: false
19+
description: If true, push pre-release tag.
1520
skip_tag:
1621
type: boolean
1722
required: true
@@ -35,10 +40,15 @@ jobs:
3540
- name: Package
3641
run: ./build-package.sh
3742
- name: Upload
38-
if: ${{ github.event.inputs.dry_run != 'true' }}
43+
if: ${{ github.event.inputs.dry_run != 'true' && github.event.inputs.pre_release != 'true' }}
3944
run: npm publish
4045
env:
4146
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
47+
- name: Upload pre-release
48+
if: ${{ github.event.inputs.dry_run != 'true' && github.event.inputs.pre_release == 'true' }}
49+
run: npm publish --tag next
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
4252
- name: Tag release
4353
if: ${{ github.event.inputs.skip_tag != 'true' }}
4454
run: |

0 commit comments

Comments
 (0)