File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 11# ⚠️ THIS WORKFLOW IS THE TRUSTED PUBLISHER CONFIGURED ON NPMJS.COM, DO NOT RENAME OR DELETE THIS FILE ⚠️
2+
23name : Publish NPM Package
34
45on :
@@ -10,10 +11,27 @@ jobs:
1011 build-and-test :
1112 uses : ./.github/workflows/main.yml
1213
13- publish :
14+ determine-dist-tag :
1415 needs : build-and-test
16+ runs-on : ubuntu-latest
17+ outputs :
18+ TAG : ${{ steps.set-dist-tag.outputs.TAG }}
19+ steps :
20+ - name : Determine package dist tag
21+ id : set-dist-tag
22+ run : |
23+ if [[ "${GITHUB_REF#refs/tags/}" == *"-rc"* ]]; then
24+ echo "TAG=rc" >> $GITHUB_OUTPUT
25+ else
26+ echo "TAG=latest" >> $GITHUB_OUTPUT
27+ fi
28+
29+ publish :
30+ needs : determine-dist-tag
1531 permissions :
1632 id-token : write # Required for OIDC
1733 packages : write
1834 contents : read
1935 uses :
iExecBlockchainComputing/github-actions-workflows/.github/workflows/[email protected] 36+ with :
37+ tag : ${{ needs.determine-dist-tag.outputs.TAG }}
You can’t perform that action at this time.
0 commit comments