name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
name: linux
artifact: plsync-linux
- os: macos-latest
name: osx
artifact: plsync-osx
- os: windows-latest
name: windows
artifact: plsync-windows.exe
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- name: Rename artifacts - Linux, macOS
if: matrix.name != 'windows'
run: mv target/release/plsync ${{ matrix.artifact }}
- name: Rename artifacts - Windows
if: matrix.name == 'windows'
run: |
Move-Item -Path target\release\plsync.exe -Destination ${{ matrix.artifact }}
shell: powershell
- name: Upload assets
uses: softprops/action-gh-release@v2
with:
files: plsync-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}