1+ name : OnMain
2+
3+ on :
4+ push :
5+ branches : [master]
6+
7+
8+
9+ permissions :
10+ contents : read
11+
12+ concurrency :
13+ group : " ${{ github.ref }}-${{ github.workflow }}"
14+ cancel-in-progress : true
15+
16+ jobs :
17+
18+ build-linux :
19+ name : Linux Build
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v1
23+ with :
24+ submodules : true
25+ - name : Build
26+ run : |
27+ mkdir -p bin/linux
28+ make clean
29+ make
30+ - name : Archive
31+ uses : actions/upload-artifact@v1
32+ with :
33+ name : Linux-binaries.zip
34+ path : bin/linux
35+ build-windows :
36+ name : Windows Build
37+ runs-on : windows-latest
38+ steps :
39+ - uses : actions/checkout@v1
40+ with :
41+ submodules : true
42+ - name : Build
43+ run : |
44+ ./build.ps1
45+ - name : Archive x86
46+ uses : actions/upload-artifact@v1
47+ with :
48+ name : Windows-x86-binaries.zip
49+ path : bin/windows/x86/Release
50+ - name : Archive x64
51+ uses : actions/upload-artifact@v1
52+ with :
53+ name : Windows-x64-binaries.zip
54+ path : bin/windows/x64/Release
55+ version :
56+ runs-on : ubuntu-latest
57+ needs :
58+ - build-linux
59+ - build-windows
60+ permissions :
61+ contents : write
62+ outputs :
63+ newtag : ${{ steps.calculate-version.outputs.version-string }}
64+ steps :
65+ - name : Checkout code
66+ uses : actions/checkout@v4
67+ with :
68+ fetch-depth : 0
69+ fetch-tags : true
70+ - name : calculate version
71+ id : calculate-version
72+ uses : bitshifted/git-auto-semver@v1
73+ with :
74+ main_branch : master
75+ create_tag : true
76+ tag_prefix : ' v'
77+ - name : Use version
78+ run : ' echo "Calculated version: ${{ steps.calculate-version.outputs.version-string }}"'
79+
80+ release :
81+ runs-on : ubuntu-latest
82+ permissions :
83+ contents : write
84+ needs : version
85+ steps :
86+ - name : Checkout code
87+ uses : actions/checkout@v4
88+ with :
89+ fetch-tags : true
90+ - name : Download artifacts
91+ uses : actions/download-artifact@v4
92+ with :
93+ path : artifacts
94+ pattern : *binaries.zip
95+ merge-multiple : true
96+ - name : Create a Release
97+ uses : softprops/action-gh-release@v2
98+ with :
99+ name : ${{ needs.version.outputs.newtag }}
100+ tag_name : ${{ needs.version.outputs.newtag }}
101+ token : ${{ secrets.GITHUB_TOKEN }}
102+ make_latest : true
103+ files :
104+ artifacts/*binaries.zip
105+
0 commit comments