fix: attach git credentials before Tag Major Version push

The Tag Major Version step ran 'git push origin' after Checkout Again
re-cloned with persist-credentials: false, leaving the remote without
credentials. This caused 'fatal: could not read Username' (exit 128) on
the first release. Set the authenticated remote URL using OSDS_ACCESS_TOKEN
before pushing tags, mirroring the Update README step.
This commit is contained in:
Tom Keller
2026-07-09 12:25:02 -07:00
parent 517a711dbc
commit 1b88572b3b
+2
View File
@@ -55,6 +55,8 @@
run: |
git config user.name "GitHub Actions"
git config user.email "github-aws-sdk-osds-automation@amazon.com"
echo "::add-mask::${{ env.OSDS_ACCESS_TOKEN }}"
git remote set-url origin https://${{ env.OSDS_ACCESS_TOKEN }}@github.com/aws-actions/configure-aws-credentials.git
if git rev-parse "v${{ steps.release.outputs.major }}" >/dev/null 2>&1; then
git tag -d "v${{ steps.release.outputs.major }}"
git push origin ":v${{ steps.release.outputs.major }}"