From 52d5feccb1d92657b40da431954bb4b991cba816 Mon Sep 17 00:00:00 2001 From: Luca Di Leo Date: Wed, 19 Apr 2023 17:23:47 +0200 Subject: [PATCH] Added release publish --- .github/workflows/build.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85f52c8..efc7e50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,11 @@ name: Build on: push: - branches: [ main ] + branches: [main] + tags: + - "v*" pull_request: - branches: [ main ] + branches: [main] # We dont have tests yet, so we can just build jobs: @@ -15,4 +17,19 @@ jobs: - name: Install dependencies run: sudo apt-get update && sudo apt install -y --fix-missing --no-install-recommends git build-essential software-properties-common cmake libtbb-dev libboost-system-dev libboost-serialization-dev libpdal-dev libeigen3-dev - name: Build - run: mkdir build && cd build && cmake -DWITH_GBT=ON .. && make -j$(nproc) \ No newline at end of file + run: mkdir build && cd build && cmake -DWITH_GBT=ON .. && make -j$(nproc) + - name: Archive compiled binaries + run: cd build && tar -czvf opc.tar.gz pcclassify pctrain + - name: Upload Distribution Files + uses: actions/upload-artifact@v2 + with: + name: Compiled Binaries + path: build/opc.tar.gz + - name: Upload Binaries to Release + uses: svenstaro/upload-release-action@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: build/opc.tar.gz + tag: ${{ github.ref }} + overwrite: true