-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (33 loc) · 1.45 KB
/
build_on_release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: C++ Build and Package
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
env:
TAG_NAME: ${{ github.ref_name }}
steps:
- uses: actions/checkout@v3
- name: Build (Release)
run: |
cmake -S ${{github.workspace}}/AimGL -B ${{github.workspace}}/build-release -DCMAKE_BUILD_TYPE=Release
cmake --build ${{github.workspace}}/build-release --config Release --target AimGLApp
- name: Package (Release)
run: |
Compress-Archive -Path "${{github.workspace}}/build-release/src/Release/*" -DestinationPath "${{github.workspace}}/build-release/src/release_windows_build_${{ env.TAG_NAME }}.zip"
- name: Build (Debug)
run: |
cmake -S ${{github.workspace}}/AimGL -B ${{github.workspace}}/build-debug -DCMAKE_BUILD_TYPE=Debug
cmake --build ${{github.workspace}}/build-debug --config Debug --target AimGLApp
- name: Package (Debug)
run: |
Compress-Archive -Path "${{github.workspace}}/build-debug/src/Debug/*" -DestinationPath "${{github.workspace}}/build-debug/src/debug_windows_build_${{ env.TAG_NAME }}.zip"
- name: List files before upload release assets
run: Get-ChildItem
- name: Upload Release Assets
uses: AButler/upload-release-assets@v3.0
with:
files: "./build-release/src/release_windows_build_*.zip;./build-debug/src/debug_windows_build_*.zip"
repo-token: ${{ secrets.GITHUB_TOKEN }}