-
-
Notifications
You must be signed in to change notification settings - Fork 638
87 lines (79 loc) · 2.27 KB
/
snap.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: snap
on:
push:
tags:
- '*'
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
steps:
- uses: actions/checkout@v2
with:
# full history for latest tag name
fetch-depth: 0
- uses: snapcore/action-build@v1
id: build-snap
# Make sure the snap is installable
- run: |
sudo snap install --dangerous ${{ steps.build-snap.outputs.snap }}
- uses: actions/upload-artifact@v3
with:
name: plotjuggler-snap
path: ${{ steps.build-snap.outputs.snap }}
publish:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v3
with:
name: plotjuggler-snap
path: .
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build.outputs.snap-file}}
release: ${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}
build22:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap22.outputs.snap }}
steps:
- uses: actions/checkout@v2
with:
# full history for latest tag name
fetch-depth: 0
- run: rm -r snap && mv snap_core22 snap
- uses: snapcore/action-build@v1
id: build-snap22
# Make sure the snap is installable
- run: |
sudo snap install --dangerous ${{ steps.build-snap22.outputs.snap }}
- uses: actions/upload-artifact@v3
with:
name: plotjuggler-snap22
path: ${{ steps.build-snap22.outputs.snap }}
publish22:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: build22
steps:
- uses: actions/download-artifact@v3
with:
name: plotjuggler-snap22
path: .
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{needs.build22.outputs.snap-file}}
release: humble/${{ startsWith(github.ref, 'refs/tags/') && 'candidate' || 'edge'}}