Skip to content

Commit 7a5d3b0

Browse files
committed
Github actions artifacts and release binaries
1 parent 02f1a70 commit 7a5d3b0

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919

2020
- name: Build
2121
run: |
22-
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} "-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install"
22+
cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
2323
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
24-
cmake --install build --config ${{ env.BUILD_TYPE }}
24+
cmake --install build --prefix ./install --config ${{ env.BUILD_TYPE }}
2525
2626
- name: Check if cmkr was run
2727
run: |
@@ -32,3 +32,29 @@ jobs:
3232
run: |
3333
cd build/tests
3434
ctest -C ${{ env.BUILD_TYPE }}
35+
36+
- name: Upload artifacts
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: ${{ github.event.repository.name }}-${{ matrix.os }}
40+
path: install/bin/*
41+
42+
- name: Get lowercase OS name
43+
id: osname
44+
uses: ASzc/change-string-case-action@v1
45+
with:
46+
string: ${{ runner.os }}
47+
48+
- name: Compress artifacts
49+
uses: papeloto/action-zip@v1
50+
with:
51+
files: install/bin/
52+
dest: ${{ github.event.repository.name }}-${{ steps.osname.outputs.lowercase }}.zip
53+
54+
- name: Release
55+
uses: softprops/action-gh-release@v1
56+
if: startsWith(github.ref, 'refs/tags/')
57+
with:
58+
files: ${{ github.event.repository.name }}-${{ steps.osname.outputs.lowercase }}.zip
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)