diff options
author | 2025-04-26 13:18:24 -0700 | |
---|---|---|
committer | 2025-04-26 13:22:00 -0700 | |
commit | b1b91fa3a8743ae37f88849cbabd1f579ca4a33d (patch) | |
tree | 416cf1874b05111dcfadb118209305c31b54ee6f | |
parent | b43f927efec7ab2ceaca70aa1eff32b6c8e54725 (diff) | |
download | github-mirror-b1b91fa3a8743ae37f88849cbabd1f579ca4a33d.tar.gz github-mirror-b1b91fa3a8743ae37f88849cbabd1f579ca4a33d.tar.zst github-mirror-b1b91fa3a8743ae37f88849cbabd1f579ca4a33d.zip |
Add release github actionv0.1.0
-rw-r--r-- | .github/workflows/release.yml | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..4cc3980 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set reusable strings + # Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. + id: strings + shell: bash + run: | + echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" + + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y \ + libcurl4-openssl-dev \ + libcmocka-dev \ + libcap-dev + + - name: Configure CMake + run: > + cmake -B ${{ steps.strings.outputs.build-output-dir }} + -DCMAKE_BUILD_TYPE=Release + -S ${{ github.workspace }} + + - name: Build + run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release + + - name: Test + working-directory: ${{ steps.strings.outputs.build-output-dir }} + run: ctest --build-config Release + + - name: Package + working-directory: ${{ steps.strings.outputs.build-output-dir }} + run: cpack -G DEB + + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + ${{ steps.strings.outputs.build-output-dir }}/*.deb |