auto-musik

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 98069dbb2cea763049dc779b3857133eae099ce0
parent c1c3d22bab221d761c8d66ae547efe859dd3600b
Author: Minerva_juppiter <94231606+minerva-jupiter@users.noreply.github.com>
Date:   Fri,  7 Nov 2025 22:06:42 +0900

Create release.yml
Diffstat:
A.github/workflows/release.yml | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+), 0 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml @@ -0,0 +1,86 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - v* + +env: + CARGO_TERM_COLOR: always + +jobs: + Test: + uses: ./.github/workflows/testing.yml + + build: + needs: [Test] + runs-on: ${{ matrix.runner }} + env: + PROJECT_NAME: auto-musik + strategy: + fail-fast: false + matrix: + include: + - target: x86_64-unknown-linux-gnu + extension: "" + runner: ubuntu-latest + cross: true + - target: x86_64-pc-windows-msvc + extension: ".exe" + runner: windows-latest + cross: false + - target: aarch64-unknown-linux-gnu + extension: "" + runner: ubuntu-latest + cross: true + - target: aarch64-pc-windows-msvc + extension: ".exe" + runner: windows-latest + cross: false + - target: armv7-unknown-linux-gnueabihf + extension: "" + runner: ubuntu-latest + cross: true + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Install Dependencies on Windows + if: ${{ matrix.runner == 'windows-latest' }} + run: | + choco install make --yes + - name: Install Dependencies on MacOS + if: ${{ matrix.runner == 'macos-latest' }} + run: | + brew install make + + - name: Install cross (if needed) + if: ${{ matrix.cross }} + run: cargo install cross --git https://github.com/cross-rs/cross + + - name: Build Project on cross + if: ${{ matrix.cross }} + run: | + cross build --release --target ${{ matrix.target }} --verbose + - name: Build Project + if: ${{ !matrix.cross }} + run: | + rustup target add ${{ matrix.target }} + cargo build --release --target ${{ matrix.target }} --verbose + + - name: Rename Artifacts + shell: bash + run: | + mv target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}{,-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}} + + - name: Release Artifacts + uses: softprops/action-gh-release@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + target/${{ matrix.target }}/release/${{ env.PROJECT_NAME }}-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.extension }}