File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*' # Triggers on tags like v1.0, v2.1.3, etc.
7+
8+ jobs :
9+ build-and-release :
10+ runs-on : ${{ matrix.os }}
11+ strategy :
12+ matrix :
13+ os : [ubuntu-latest, macos-latest, windows-latest]
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Install dependencies (Linux)
19+ if : runner.os == 'Linux'
20+ run : |
21+ sudo apt-get update
22+ sudo apt-get install -y build-essential
23+
24+ - name : Build with Make
25+ working-directory : ./mas
26+ shell : bash
27+ run : make
28+
29+ # Determine the correct binary name per OS
30+ - name : Set binary name
31+ id : binary
32+ shell : bash
33+ run : |
34+ if [[ "${{ runner.os }}" == "Windows" ]]; then
35+ echo "name=mas.exe" >> $GITHUB_OUTPUT
36+ echo "path=mas/mas.exe" >> $GITHUB_OUTPUT
37+ else
38+ echo "name=mas" >> $GITHUB_OUTPUT
39+ echo "path=mas/mas" >> $GITHUB_OUTPUT
40+ fi
41+
42+ # Upload binary to the release
43+ - name : Upload release asset
44+ uses : softprops/action-gh-release@v2
45+ with :
46+ files : ${{ steps.binary.outputs.path }}
47+ tag_name : ${{ github.ref_name }}
48+ draft : false
49+ prerelease : false
50+ env :
51+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments