File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ name: publish
33on :
44 workflow_dispatch :
55 inputs :
6- bump :
7- description : Version bump (prerelease publishes <next>-tp.0 to the next dist-tag for testing)
6+ version_type :
7+ description : Version Type
88 required : true
99 default : patch
1010 type : choice
2525 contents : write
2626 id-token : write
2727 env :
28- BUMP : ${{ inputs.bump }}
28+ VERSION_TYPE : ${{ inputs.version_type }}
2929 steps :
3030 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131 with :
@@ -42,17 +42,17 @@ jobs:
4242 run : |
4343 git config user.name "github-actions[bot]"
4444 git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
45- npm version "$BUMP " --preid tp
45+ npm version "$VERSION_TYPE " --preid tp
4646
4747 - name : Publish
48- run : npm publish --access public --tag "$([ "$BUMP " = prerelease ] && echo next || echo latest)"
48+ run : npm publish --access public --tag "$([ "$VERSION_TYPE " = prerelease ] && echo next || echo latest)"
4949
5050 - name : Push tag
51- if : inputs.bump == 'prerelease'
51+ if : inputs.version_type == 'prerelease'
5252 run : git push origin "$(git describe --exact-match)"
5353
5454 - name : Push tag and version bump branch
55- if : inputs.bump != 'prerelease'
55+ if : inputs.version_type != 'prerelease'
5656 run : |
5757 branch="release-$(date +%s)"
5858 git push --follow-tags origin "HEAD:refs/heads/$branch"
You can’t perform that action at this time.
0 commit comments