Skip to content

Commit d12f2c8

Browse files
committed
make release a seperate github workflow
1 parent a52601e commit d12f2c8

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
env:
9+
BUILD_TYPE: Debug
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
19+
- name: Configure CMake
20+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
21+
22+
- name: Build
23+
# Build your program with the given configuration
24+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target release
25+
26+
- name: 'Upload Artifact'
27+
uses: actions/upload-artifact@v3
28+
with:
29+
name: cib.hpp
30+
path: build/cib.hpp
31+
32+
- name: Release
33+
uses: softprops/[email protected]
34+
with:
35+
files: build/cib.hpp
36+
37+

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
7171
run: ctest -C ${{env.BUILD_TYPE}}
7272

73-
release:
73+
build_single_header:
7474
needs: build_and_test
7575
runs-on: ubuntu-latest
7676
steps:
@@ -91,10 +91,5 @@ jobs:
9191
name: cib.hpp
9292
path: build/cib.hpp
9393

94-
- name: Release
95-
uses: softprops/[email protected]
96-
if: startsWith(github.ref, 'refs/tags/')
97-
with:
98-
files: build/cib.hpp
9994

10095

0 commit comments

Comments
 (0)