-
Notifications
You must be signed in to change notification settings - Fork 21
42 lines (35 loc) · 1.14 KB
/
snap.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
name: Snap
on:
merge_group:
types: [checks_requested]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
Snap:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
platform:
- amd64
- armhf
- arm64
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for version determination
- name: Patch PPA and version
run: |
sed -i 's@mir-team/release@mir-team/dev@' snap/snapcraft.yaml
sed -i 's@rev-list --count@rev-parse --short@' snap/snapcraft.yaml
- name: Build and publish the snap
uses: canonical/actions/build-snap@release
with:
architecture: ${{ matrix.platform }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
launchpad-credentials: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
launchpad-accept-public-upload: true
publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
publish-channel: 24/edge/pr${{ github.event.number }}