Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 8a96709

Browse files
committed
Remove extra_release workflow to merge onto single workflow file
1 parent 1fc4407 commit 8a96709

File tree

2 files changed

+60
-71
lines changed

2 files changed

+60
-71
lines changed

.github/workflows/extra_release.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ on:
88
- "v*.*.*"
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: write
13+
1114
jobs:
12-
build:
15+
build-common-archs:
1316
runs-on: ${{ matrix.os }}
14-
permissions:
15-
contents: write
1617
strategy:
1718
matrix:
1819
include:
@@ -64,3 +65,59 @@ jobs:
6465
asset_name: ${{ matrix.filename }}
6566
tag: ${{ github.ref }}
6667
file_glob: false
68+
69+
build-extra-archs:
70+
runs-on: ubuntu-latest
71+
strategy:
72+
matrix:
73+
include:
74+
- target: aarch64-unknown-linux-gnu
75+
filename: downapk-linux-aarch64
76+
- target: aarch64-linux-android
77+
filename: downapk-android-aarch64
78+
- target: armv7-unknown-linux-gnueabihf
79+
filename: downapk-linux-armv7
80+
- target: armv7-linux-androideabi
81+
filename: downapk-android-armv7
82+
- target: x86_64-linux-android
83+
filename: downapk-android-x86_64
84+
- target: i686-unknown-linux-gnu
85+
filename: downapk-linux-i686
86+
87+
steps:
88+
- name: Checkout code
89+
uses: actions/checkout@v4
90+
91+
- name: Setup Rust
92+
run: |
93+
rustup update --no-self-update stable
94+
rustup component add --toolchain stable rustfmt rust-src
95+
rustup default stable
96+
97+
- name: Setup Cache
98+
uses: actions/cache@v4
99+
env:
100+
cache-name: cache-cargo-${{ matrix.target }}
101+
with:
102+
path: |
103+
~/.cargo
104+
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
105+
restore-keys: |
106+
${{ runner.os }}-cargo-${{ matrix.target }}-
107+
108+
- name: Install dependencies
109+
run: |
110+
cargo install cross --git https://github.com/cross-rs/cross
111+
112+
- name: Build ${{ matrix.target }}
113+
run: cross build --release --target ${{ matrix.target }}
114+
115+
- name: Upload unix-like binaries to release
116+
uses: svenstaro/upload-release-action@v2
117+
if: contains(matrix.target, 'windows') == false
118+
with:
119+
repo_token: ${{ secrets.GITHUB_TOKEN }}
120+
file: target/${{ matrix.target }}/release/downapk
121+
asset_name: ${{ matrix.filename }}
122+
tag: ${{ github.ref }}
123+
file_glob: false

0 commit comments

Comments
 (0)