1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00
sdrangel/.github/workflows/snap.yml

45 lines
1.3 KiB
YAML
Raw Normal View History

2024-10-31 09:31:05 -04:00
# See: https://github.com/snapcore/action-build
2024-10-31 09:21:34 -04:00
name: SDRangel snap release build
on:
push:
branches:
- snap
tags:
- 'v*'
jobs:
build_snap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Get version
id: get_version
2024-10-31 12:05:50 -04:00
run: |
2024-10-31 12:07:48 -04:00
if [[ "${{github.ref_name}}" == "snap" ]]; then
2024-10-31 12:05:50 -04:00
echo "version=${{github.sha}}" >> $GITHUB_OUTPUT
else
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
fi
- uses: snapcore/action-build@v1
id: build
2024-10-31 09:21:34 -04:00
- name: Upload artifact
uses: actions/upload-artifact@v4
2024-10-31 09:21:34 -04:00
with:
name: sdrangel-${{ steps.get_version.outputs.version }}-amd64.snap
path: ${{ steps.build.outputs.snap }}
- name: Upload release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: ${{ steps.build.outputs.snap }}
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
snap: ${{ steps.build.outputs.snap }}
release: stable