-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 922 Bytes
/
build-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
name: Build snap package
run-name: ${{ github.actor }} is building a snap
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allow manual trigger
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Branch name
env:
PR_NR: ${{ github.event.pull_request.number }}
EV_NR: ${{ github.event.number }}
run: |
echo "GITHUB_REF=${GITHUB_REF}"
echo "GITHUB_HEAD_REF=${GITHUB_HEAD_REF}"
echo "PR_NR=${PR_NR}"
echo "EV_NR=${EV_NR}"
echo "${{ toJson(github) }}"
- name: Build snap
uses: snapcore/action-build@v1
id: snapcraft
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: go-hello-world.snap
path: ${{ steps.snapcraft.outputs.snap }}
if-no-files-found: error