Skip to content

Commit

Permalink
make release a seperate github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevalenty committed Apr 7, 2022
1 parent a52601e commit d12f2c8
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

env:
BUILD_TYPE: Debug

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target release

- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: cib.hpp
path: build/cib.hpp

- name: Release
uses: softprops/action-gh-release@v0.1.14
with:
files: build/cib.hpp


7 changes: 1 addition & 6 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}

release:
build_single_header:
needs: build_and_test
runs-on: ubuntu-latest
steps:
Expand All @@ -91,10 +91,5 @@ jobs:
name: cib.hpp
path: build/cib.hpp

- name: Release
uses: softprops/action-gh-release@v0.1.14
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/cib.hpp


0 comments on commit d12f2c8

Please # to comment.