-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve gha to parallelise building for multiple platforms
- Loading branch information
1 parent
4fc19e3
commit 13a416b
Showing
2 changed files
with
46 additions
and
32 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,46 @@ | ||
name: Build Release | ||
on: | ||
push: | ||
tags: ["*"] | ||
branches: ["*"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" | ||
strategy: | ||
matrix: | ||
target: ["x86_64-unknown-linux-musl", "aarch64-unknown-linux-musl"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v2 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Install cross | ||
run: | | ||
cargo install cross --git https://github.com/cross-rs/cross | ||
- name: Build project ${{ matrix.target }} | ||
run: | | ||
cross build --release --target ${{ matrix.target }} | ||
- name: Upload build result | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: target/release/${{ matrix.target }}/modrinth-downloader | ||
name: modrinth-downloader-${{ matrix.target }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
permissions: | ||
contents: write | ||
steps: | ||
- name: Download build results | ||
uses: actions/download-artifact@v4 | ||
- uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
modrinth-downloader-* |
This file was deleted.
Oops, something went wrong.