-
Notifications
You must be signed in to change notification settings - Fork 10
45 lines (43 loc) · 1.08 KB
/
build-pr.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
name: Build PR
on:
pull_request:
types:
- opened
- synchronize
- labeled
jobs:
build_amd64:
runs-on: ubuntu-latest
if: |
github.event.pull_request.state == 'open' &&
(
(
github.event.action == 'labeled' &&
github.event.label.name == 'safe to publish'
) ||
(
github.event.action != 'labeled' &&
contains(github.event.pull_request.labels.*.name, 'safe to publish')
)
)
steps:
- uses: actions/checkout@v4
- name: install snapcraft
run: |
sudo snap install snapcraft --classic
- name: build snap
run: |
sudo snapcraft --destructive-mode
- name: save PR data
run: |
mkdir -p ./pr-data
echo '${{ github.event.number }}' > ./pr-data/pr-number
echo '${{ github.event.pull_request.head.sha }}' > ./pr-data/pr-commit
- uses: actions/upload-artifact@v4
with:
name: snap
path: freecad*.snap
- uses: actions/upload-artifact@v4
with:
name: pr-data
path: pr-data/