Skip to content

Merge pull request #77 from Umatriz/dev #21

Merge pull request #77 from Umatriz/dev

Merge pull request #77 from Umatriz/dev #21

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
publish:
name: Publish release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- name: Clone project
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build project
uses: actions-rs/cargo@v1.0.1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
- name: Make asset
shell: bash
run: |
name="client-${{ matrix.target }}"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv "target/${{ matrix.target }}/release/client.exe" "$name.exe"
echo "ASSET=$name.exe" >> $GITHUB_ENV
else
mv "target/${{ matrix.target }}/release/client" "$name"
echo "ASSET=$name" >> $GITHUB_ENV
fi
- name:
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
${{ env.ASSET }}