forked from qbittorrent/qBittorrent
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,194 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
branches: | ||
- "*" | ||
release: | ||
types: | ||
- released | ||
|
||
jobs: | ||
appimage: | ||
runs-on: ubuntu-latest | ||
container: "ubuntu:20.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: "abcfy2/muslcc-toolchain-ubuntu:${{ matrix.cross_host }}" | ||
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 | ||
- i686-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 |
Oops, something went wrong.