Skip to content

Commit 06d3f35

Browse files
committed
Fix Tag-Push Token
1 parent 6e88193 commit 06d3f35

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

.github/workflows/tag-and-release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ jobs:
6868
- uses: actions/checkout@v4
6969
with:
7070
fetch-depth: 0 # required to see tags and commits
71-
ref: ${{ github.sha }} # lock to triggered commit ('github.ref' is dynamic)
71+
ref: ${{ github.ref }} # dont lock to sha (action needs to push)
72+
token: ${{ secrets.TOKEN || github.token }}
7273

7374
# PYTHON ONLY: setup python
7475
- if: inputs.project-type == 'python'
@@ -90,13 +91,10 @@ jobs:
9091
9192
- if: steps.next-version.outputs.version != ''
9293
name: Tag new version
93-
env:
94-
AUTH_TOKEN: ${{ secrets.TOKEN || github.token }}
9594
run: |
9695
set -euo pipefail; echo "now: $(date -u +"%Y-%m-%dT%H:%M:%S.%3N")"
97-
echo "::add-mask::${AUTH_TOKEN}" # logging safety
9896
git tag v${{ steps.next-version.outputs.version }} # note: prepend 'v'
99-
git push https://x-access-token:${AUTH_TOKEN}@github.com/${{ github.repository }} --tags
97+
git push origin --tags
10098
10199
# PYTHON ONLY: auto-build
102100
- if: |

0 commit comments

Comments
 (0)