-
Notifications
You must be signed in to change notification settings - Fork 948
66 lines (62 loc) · 1.59 KB
/
snapcraft.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
name: Snapcraft
on:
push:
branches:
- main
tags:
- "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: snapcore/action-build@v1
id: snapcraft
- run: |
sudo apt-get update
sudo apt-get install libportaudio2
- run: sudo snap install --devmode *.snap
- run: |
cd $HOME
xvfb-run buzz --version
- uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}
upload-edge:
runs-on: ubuntu-latest
needs: [ build ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
name: snap
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ needs.build.outputs.snap }}
release: edge
upload-stable:
runs-on: ubuntu-latest
needs: [ build ]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: snap
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ needs.build.outputs.snap }}
release: stable