Skip to content

Commit c86b105

Browse files
committed
chore: move release tag to after release is successful
1 parent d2d0f2e commit c86b105

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

.github/actions/set_version/action.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ inputs:
44
new_release_version:
55
description: 'The new version string'
66
required: true
7-
commit_changes:
8-
description: 'Whether to commit the changes or not'
9-
required: false
10-
default: "false"
11-
github_token:
12-
description: 'GitHub token'
13-
required: true
147
runs:
158
using: "composite"
169
steps:
@@ -25,16 +18,3 @@ runs:
2518
pip install meson
2619
meson rewrite kwargs set project // version ${{ inputs.new_release_version }}
2720
shell: bash
28-
29-
- name: Commit and push Version Changes
30-
if: ${{ inputs.commit_changes == 'true' }}
31-
shell: bash
32-
run: |
33-
git config --global user.email "[email protected]"
34-
git config --global user.name "GitHub Action"
35-
git add Source/System/GameVersion.h meson.build
36-
git commit -m "Update version" || echo "No changes to commit"
37-
git push
38-
env:
39-
GITHUB_TOKEN: ${{ inputs.github_token }}
40-

.github/workflows/release.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ jobs:
5050
uses: ./.github/actions/set_version
5151
with:
5252
new_release_version: ${{ github.event.inputs.new_release_version}}
53-
commit_changes: true
54-
github_token: ${{ secrets.GITHUB_TOKEN }}
5553

5654
- name: Bundle release assets
5755
uses: ./.github/actions/bundle_release
@@ -69,6 +67,17 @@ jobs:
6967
env:
7068
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7169

70+
- name: Commit and push Version Changes
71+
shell: bash
72+
run: |
73+
git config --global user.email "[email protected]"
74+
git config --global user.name "GitHub Action"
75+
git add Source/System/GameVersion.h meson.build
76+
git commit -m "Release v${{ inputs.new_release_version }}" || echo "No changes to commit"
77+
git push
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}
80+
7281
- name: Update latest tag
7382
run: |
7483
curl -X PATCH \

0 commit comments

Comments
 (0)