Merge pull request #179 from brotskydotcom/master #26
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish executables | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
include: | |
- os: windows-latest | |
executable_name: examples/cli.exe | |
posted_name: cli.windows.exe | |
- os: macos-latest | |
executable_name: examples/cli | |
posted_name: cli.macos | |
- os: ubuntu-latest | |
executable_name: examples/cli | |
posted_name: cli.linux | |
steps: | |
- name: Fetch head | |
uses: actions/checkout@v4 | |
- name: Install rust stable | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build --release --features=apple-native,windows-native,linux-native --example cli | |
- name: Post cli executable | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/release/${{ matrix.executable_name }} | |
asset_name: ${{ matrix.posted_name }} | |
tag: ${{ github.ref }} |