-
-
Notifications
You must be signed in to change notification settings - Fork 54
44 lines (38 loc) · 1.13 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 Toolchain (stable)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Build (release, locked)
run: cargo build --release --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 }}