forked from c0re100/qBittorrent-Enhanced-Edition
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (88 loc) · 2.82 KB
/
build_and_release.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
name: Build and Release
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
release:
types:
- released
jobs:
appimage:
runs-on: ubuntu-latest
container: "ubuntu:18.04"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
/usr/src/
/var/cache/apt/
key: appimage-build-dependencies-cache-${{ github.sha }}
restore-keys: |
appimage-build-dependencies-cache-
- name: Build AppImage
run: .github/workflows/build_appimage.sh
- uses: actions/upload-artifact@v3
with:
name: qBittorrent-Enhanced-Edition-x86_64.AppImage
path: ".github/workflows/qBittorrent-Enhanced-Edition*.AppImage*"
- name: Upload Github Assets
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ".github/workflows/qBittorrent-Enhanced-Edition*.AppImage*"
tag: ${{ github.ref }}
overwrite: true
file_glob: true
# cross compile for some other platforms, like arm, mips, etc.
cross-compile:
runs-on: ubuntu-latest
container: "ubuntu:20.04"
strategy:
fail-fast: false
matrix:
cross_host:
# cross toolchain downloads from: https://musl.cc/
# you need to find the name ${cross_host}-cross.tgz
- arm-linux-musleabi
# Waiting this issue to be resolved: https://github.com/zlib-ng/zlib-ng/issues/1138
# - arm-linux-musleabihf
- aarch64-linux-musl
- mips-linux-musl
- mipsel-linux-musl
- mips64-linux-musl
- mips64el-linux-musl
- x86_64-linux-musl
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
/usr/src/
/var/cache/apt/
key: cross-build-dependencies-cache-${{ matrix.cross_host }}-${{ github.sha }}
restore-keys: |
cross-build-dependencies-cache-${{ matrix.cross_host }}-
- name: cross compile nox-static
env:
CROSS_HOST: "${{ matrix.cross_host }}"
run: .github/workflows/cross_build.sh
- uses: actions/upload-artifact@v3
with:
name: qbittorrent-enhanced-nox_${{ matrix.cross_host }}_static
path: |
/tmp/qbittorrent-nox*
- name: Upload Github Assets
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ".github/workflows/qbittorrent-enhanced-nox_${{ matrix.cross_host }}_static.zip"
tag: ${{ github.ref }}
overwrite: true