From ab13f94cf0987c38835c872b721312ad01fc8c8c Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 13:21:34 +0000 Subject: [PATCH] Add github action to build snap. --- .github/workflows/snap.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/snap.yml diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml new file mode 100644 index 000000000..ce3683ed9 --- /dev/null +++ b/.github/workflows/snap.yml @@ -0,0 +1,31 @@ +name: SDRangel snap release build + +on: + push: + branches: + - snap + tags: + - 'v*' + pull_request: + +jobs: + build_snap: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + - name: Install Snapcraft + uses: samuelmeuli/action-snapcraft@v2 + - name: Build snap + run: | + snapcraft + - name: Get version + id: get_version + run: echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $env:GITHUB_OUTPUT + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: sdrangel-${{ steps.get_version.outputs.version }}-amd64.snap + path: ${{ github.workspace }}/sdrangel_${{ steps.get_version.outputs.version }}_amd64.snap