17
17
release :
18
18
runs-on : ubuntu-latest
19
19
outputs :
20
- release_created : ${{ steps.release.outputs.release_created }}
20
+ releases_created : ${{ steps.release.outputs.releases_created }}
21
21
tag_name : ${{ steps.release.outputs.tag_name }}
22
22
steps :
23
23
- name : Checkout
@@ -33,19 +33,23 @@ jobs:
33
33
- name : Generate & Commit Version Header
34
34
if : ${{ steps.release.outputs.releases_created }}
35
35
run : |
36
+ # Generate the version header file
36
37
echo "// Do not modify this file, it is overwritten by release-please.yml!" > ${{ env.VER_FILE }}
37
38
echo "#pragma once" >> ${{ env.VER_FILE }}
38
- echo "constexpr const wchar_t APP_VERSION[] = L\"${{ steps.release.outputs.tag_name }}\"" >> ${{ env.VER_FILE }}
39
+ echo "constexpr const wchar_t APP_VERSION[] = L\"${{ steps.release.outputs.tag_name }}\";" >> ${{ env.VER_FILE }}
40
+
41
+ # Commit & push the changes to the release branch
42
+ RELEASE_BRANCH=$(git rev-parse --abbrev-ref HEAD)
39
43
git config user.name "github-actions[bot]"
40
44
git config user.email "github-actions[bot]@users.noreply.github.com"
41
- git add ${{ env.VER_FILE }}
45
+ git add ${{ env.VER_FILE }}
42
46
git commit -m "chore: update version header to ${{ steps.release.outputs.tag_name }}"
43
- git push
47
+ git push origin $RELEASE_BRANCH
44
48
45
49
build-x64 :
46
50
name : Build x64 Release
47
51
needs : release
48
- if : ${{ needs.release.outputs.release_created }}
52
+ if : ${{ needs.release.outputs.releases_created }}
49
53
uses : ./.github/workflows/build.yml
50
54
secrets : inherit
51
55
with :
55
59
build-x86 :
56
60
name : Build x86 Release
57
61
needs : release
58
- if : ${{ needs.release.outputs.release_created }}
62
+ if : ${{ needs.release.outputs.releases_created }}
59
63
uses : ./.github/workflows/build.yml
60
64
secrets : inherit
61
65
with :
66
70
name : Publish Release
67
71
runs-on : ubuntu-latest
68
72
needs : [release,build-x64, build-x86]
69
- if : ${{ needs.release.outputs.release_created }}
73
+ if : ${{ needs.release.outputs.releases_created }}
70
74
steps :
71
75
- name : Checkout code
72
76
uses : actions/checkout@v4
0 commit comments