File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -2,20 +2,33 @@ name: publish
22
33on :
44 release :
5- types : [released]
5+ # both release and prereleases
6+ types : [published]
67 # support manual release in case something goes wrong and needs to be repeated or tested
78 workflow_dispatch :
89 inputs :
910 tag :
10- description : tag that needs to publish
11+ description : github tag that needs to publish
1112 type : string
1213 required : true
14+
1315jobs :
16+ # parses the package.json version and detects prerelease tag (ex: beta from 4.4.4-beta.0)
17+ getDistTag :
18+ outputs :
19+ tag : ${{ steps.distTag.outputs.tag }}
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v3
23+ with :
24+ ref : ${{ github.event.release.tag_name || inputs.tag }}
25+ - uses : salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main
26+ id : distTag
27+
1428 npm :
1529 uses : salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main
30+ needs : [getDistTag]
1631 with :
17- ctc : true
18- sign : true
19- tag : latest
32+ tag : ${{ needs.getDistTag.outputs.tag || 'latest' }}
2033 githubTag : ${{ github.event.release.tag_name || inputs.tag }}
2134 secrets : inherit
You can’t perform that action at this time.
0 commit comments