File tree Expand file tree Collapse file tree 2 files changed +28
-49
lines changed
Expand file tree Collapse file tree 2 files changed +28
-49
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,18 @@ name: Publish
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ tag :
7+ description : ' The npm tag to publish to'
8+ required : true
9+ type : choice
10+ options :
11+ - latest
12+ - rc
13+
14+ permissions :
15+ id-token : write
16+ contents : write
517
618jobs :
719 publish :
@@ -21,11 +33,23 @@ jobs:
2133 git config --global user.name 'Keystonejs Release Bot'
2234 git config --global user.email 'automation+keystonejs@thinkmill.com.au'
2335
36+ - name : version packages
37+ if : inputs.tag != 'latest'
38+ run : |
39+ pnpm changeset version --snapshot ${{ inputs.tag }}
40+ git commit -a -m 'rc'
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+
2444 - run : pnpm build
2545
2646 - name : npm publish, git tag
27- run : pnpm changeset publish
28- env :
29- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
47+ run : pnpm changeset publish --tag ${{ inputs.tag }}
48+
49+ # reset, then we have a tagged dangling commit
50+ - name : git push
51+ if : inputs.tag != 'latest'
52+ run : |
53+ git reset HEAD~1 --hard
3054
31- - run : git push origin --follow- tags
55+ - run : git push origin --tags
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments