File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 2626 id-token : write # Required for OIDC
2727 steps :
2828 - uses : actions/checkout@v4
29+ with :
30+ fetch-depth : 0
2931 - uses : actions/setup-node@v4
3032 with :
3133 node-version : lts/*
3739 - run : |
3840 git config --global user.name 'github-actions[bot]'
3941 git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
40- - run : |
41- git tag "v$(jq -r .version package.json)"
42- git push origin "v$(jq -r .version package.json)"
43- - run : npm publish
42+ - name : Create and push git tag if not exists
43+ run : |
44+ TAG="v$(jq -r .version package.json)"
45+ if git rev-parse -q --verify "refs/tags/$TAG" >/dev/null; then
46+ echo "Tag $TAG already exists. Skipping tag creation and push."
47+ else
48+ git tag "$TAG"
49+ git push origin "$TAG"
50+ fi
51+ - run : npm publish --provenance
You can’t perform that action at this time.
0 commit comments