-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (68 loc) · 1.72 KB
/
main.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
67
68
69
70
71
72
73
74
75
76
77
78
name: Slumber build
on:
push:
branches:
- master
tags:
- '*'
#pull_request:
# branches:
# - master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Prepare
run: mkdir output
- name: Build armv7hl
id: build_armv7hl
uses: coderus/github-sfos-build@master
with:
release: 4.5.0.16
- name: Build i486
id: build_i486
uses: coderus/github-sfos-build@master
with:
release: 4.5.0.16
arch: i486
# aarch64 complains about ssl/crypto
# with older targets, so we use a
# newer release
- name: Build aarch64
id: build_aarch64
uses: coderus/github-sfos-build@master
with:
release: 4.5.0.16
arch: aarch64
- name: Upload build result
uses: actions/upload-artifact@v2
with:
name: rpm-build-result
path: RPMS
- name: Create release
if: contains(github.ref, 'v')
run: |
set -x
assets=()
for asset in RPMS/*.rpm; do
assets+=("$asset")
done
tag_name="${GITHUB_REF##*/}"
gh release create "$tag_name" "${assets[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create prerelease
if: contains(github.ref, 'pre')
run: |
set -x
assets=()
for asset in RPMS/*.rpm; do
assets+=("$asset")
done
tag_name="${GITHUB_REF##*/}"
gh release create "$tag_name" -p -n "This is a pre-release for testing purposes only. It may or may not be unstable." "${assets[@]}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}