File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
.github/actions/set_version Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ' Set Version'
2
+ description : ' Updates all references to the current game version'
3
+ inputs :
4
+ new_release_version :
5
+ description : ' The new version string'
6
+ required : true
7
+ commit_changes :
8
+ description : ' Whether to commit the changes or not'
9
+ required : false
10
+ default : " false"
11
+ runs :
12
+ using : " composite"
13
+ steps :
14
+ - name : Set Constants.h GameVersion
15
+ run : sed -i -E '/c_GameVersion = /s/"[^"]*"/"${{inputs.new_release_version}}"/' System/Constants.h
16
+ shell : bash
17
+
18
+ - uses : actions/setup-python@v3
19
+
20
+ - name : Rewrite meson version
21
+ run : |
22
+ pip install meson
23
+ meson rewrite kwargs set project // version ${{ inputs.new_release_version }}
24
+ shell : bash
25
+
26
+ - name : Commit and push Version Changes
27
+ if : ${{ inputs.commit_changes == 'true' }}
28
+ shell : bash
29
+ run : |
30
+ git config --global user.email "[email protected] "
31
+ git config --global user.name "GitHub Action"
32
+ git add System/GameVersion.h meson.build
33
+ git commit -m "Update version" || echo "No changes to commit"
34
+ git push
35
+ env :
36
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37
+
You can’t perform that action at this time.
0 commit comments