-
Notifications
You must be signed in to change notification settings - Fork 34
102 lines (89 loc) · 2.6 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Fernschreiber build
on:
push:
branches:
- master
tags:
- '*'
# to prevent secrets leaking,
# we don't build on PRs
#pull_request:
# branches:
# - master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Prepare
run: mkdir output
- name: Fetch TDLib
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "Wunderfitz/td"
file: "tdlib.zip"
target: tdlib/tdlib.zip
token: ${{ secrets.GITHUB_TOKEN }}
- name: Decompress TDLib
uses: TonyBogdanov/zip@1.0
with:
args: unzip -qq ./tdlib/tdlib.zip -d ./tdlib
- name: Set Secrets
uses: DamianReeves/write-file-action@master
with:
path: ./src/tdlibsecrets.h
contents: |
#ifndef TDLIBSECRETS_H
#define TDLIBSECRETS_H
const char TDLIB_API_ID[] = "${{secrets.TDLIB_API_ID}}";
const char TDLIB_API_HASH[] = "${{secrets.TDLIB_API_HASH}}";
#endif // TDLIBSECRETS_H
write-mode: overwrite
- name: Build armv7hl
id: build_armv7hl
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
- name: Build i486
id: build_i486
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
arch: i486
- name: Build aarch64
id: build_aarch64
uses: coderus/github-sfos-build@master
with:
release: 4.4.0.58
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+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
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+=("-a" "$asset")
done
tag_name="${GITHUB_REF##*/}"
hub release create -p "${assets[@]}" -m "$tag_name" -m "This is a pre-release for testing purposes only. It may or may not be unstable." -m "Join the Telegram group to help out: https://github.com/Wunderfitz/harbour-fernschreiber/issues/162" "$tag_name"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}