File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Publish Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ jobs :
9+ build :
10+ name : Build ${{ matrix.os }}
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ matrix :
14+ include :
15+ - os : windows-latest
16+ artifact_name : xary-v1.0.0-windows-x64.zip
17+ asset_name : xary.exe
18+ - os : ubuntu-latest
19+ artifact_name : xary-v1.0.0-linux-x64.tar.gz
20+ asset_name : xary
21+ - os : macos-latest
22+ artifact_name : xary-v1.0.0-macos-x64.tar.gz
23+ asset_name : xary
24+
25+ steps :
26+ - name : Checkout Code
27+ uses : actions/checkout@v4
28+
29+ - name : Configure CMake
30+ run : cmake -B build -DCMAKE_BUILD_TYPE=Release
31+
32+ - name : Build Binary
33+ run : cmake --build build --config Release --parallel
34+
35+ - name : Package Windows Binary
36+ if : runner.os == 'Windows'
37+ run : |
38+ compress-archive -Path build/Release/xary.exe, README.md, LICENSE -DestinationPath ${{ matrix.artifact_name }}
39+
40+ - name : Package Linux / macOS Binary
41+ if : runner.os != 'Windows'
42+ run : |
43+ tar -czvf ${{ matrix.artifact_name }} -C build xary ../README.md ../LICENSE
44+
45+ - name : Upload Binaries to Release
46+ uses : softprops/action-gh-release@v1
47+ with :
48+ files : ${{ matrix.artifact_name }}
49+ env :
50+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments