Skip to content

Commit 4ffa01c

Browse files
committed
ci: merge release commit and tag steps
1 parent c178323 commit 4ffa01c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/release.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,22 @@ jobs:
6767
env:
6868
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6969

70-
- name: Commit and push Version Changes
70+
- name: Commit and push Version Changes and Update latest tag
7171
shell: bash
7272
run: |
7373
git config --global user.email "[email protected]"
7474
git config --global user.name "GitHub Action"
7575
git add Source/System/GameVersion.h meson.build
7676
git commit -m "Release v${{ inputs.new_release_version }}" || echo "No changes to commit"
7777
git push
78-
env:
79-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
8078
81-
- name: Update latest tag
82-
run: |
79+
RELEASE_COMMIT=$(git rev-parse HEAD)
8380
curl -X PATCH \
8481
-H "Authorization: Bearer ${{ secrets.WORKFLOW_TOKEN }}" \
8582
-H "Accept: application/vnd.github.v3+json" \
8683
https://api.github.com/repos/${{ github.repository }}/git/refs/tags/${{ env.LATEST_TAG }} \
8784
-d '{
88-
"sha": "${{ github.sha }}"
85+
"sha": "$RELEASE_COMMIT",
8986
}'
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)