name: Release
on:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
extension: .exe
- os: windows-latest
target: i686-pc-windows-msvc
extension: .exe
- os: windows-latest
target: aarch64-pc-windows-msvc
extension: .exe
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- os: ubuntu-20.04
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Git Repository
uses: actions/checkout@v3
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Build
run: cargo build --release --target ${{ matrix.target }}
- name: Rename Binaries
run: |
mv 'target/${{ matrix.target }}/release/mcfunction-debugger${{ matrix.extension }}' 'target/${{ matrix.target }}/release/mcfunction-debugger-${{ matrix.target }}${{ matrix.extension }}'
- name: GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
target/${{ matrix.target }}/release/mcfunction-debugger-${{ matrix.target }}${{ matrix.extension }}