-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI for building release binaries
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
windows: | ||
name: Windows release | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: | | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release | ||
cmake --build build --target trex --config Release | ||
- name: pack binary | ||
run: | | ||
move build\Release\trex.lib . | ||
7z a -tzip trex.zip trex.lib | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: trex-windows-msvc-x64 | ||
path: trex.zip | ||
|
||
linux: | ||
name: Linux release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: build | ||
run: | | ||
cmake -B build -DCMAKE_BUILD_TYPE=Release | ||
cmake --build build --target trex --config Release | ||
- name: pack binary | ||
run: | | ||
mv build/trex.a . | ||
tar -czf trex.tar.gz trex.a | ||
- name: upload artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: trex-linux-gcc-x64 | ||
path: trex.tar.gz |