Skip to content

actually upload the build results to release #9

actually upload the build results to release

actually upload the build results to release #9

Workflow file for this run

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@v4
- 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: Rename build results
run: |
mv target/${{ matrix.target }}/release/modrinth-downloader modrinth-downloader-${{ matrix.target }}
- name: Upload build result
uses: actions/upload-artifact@v4
with:
path: modrinth-downloader-${{ matrix.target }}
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
- name: List build results
run: tree
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./*/modrinth-downloader-*