Skip to content

Commit 12ca109

Browse files
committed
ci: build and publish more binaries upon release
1 parent a3851ce commit 12ca109

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/binaries.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Publish binaries"
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
env:
11+
CARGO_INCREMENTAL: 0
12+
CARGO_NET_GIT_FETCH_WITH_CLI: true
13+
CARGO_NET_RETRY: 10
14+
CARGO_TERM_COLOR: always
15+
RUST_BACKTRACE: 1
16+
RUSTFLAGS: -D warnings
17+
RUSTUP_MAX_RETRIES: 10
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
upload-assets:
25+
name: ${{ matrix.target }}
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
include:
30+
- target: aarch64-unknown-linux-gnu
31+
os: ubuntu-22.04
32+
- target: aarch64-unknown-linux-musl
33+
os: ubuntu-22.04
34+
- target: aarch64-apple-darwin
35+
os: macos-12
36+
- target: aarch64-pc-windows-msvc
37+
os: windows-2022
38+
- target: x86_64-unknown-linux-gnu
39+
os: ubuntu-22.04
40+
- target: x86_64-unknown-linux-musl
41+
os: ubuntu-22.04
42+
- target: x86_64-apple-darwin
43+
os: macos-12
44+
- target: x86_64-pc-windows-msvc
45+
os: windows-2022
46+
- target: x86_64-unknown-freebsd
47+
os: ubuntu-22.04
48+
timeout-minutes: 60
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
- name: Install Rust toolchain
53+
uses: dtolnay/rust-toolchain@stable
54+
- uses: taiki-e/setup-cross-toolchain-action@v1
55+
with:
56+
target: ${{ matrix.target }}
57+
if: startsWith(matrix.os, 'ubuntu') && !contains(matrix.target, '-musl')
58+
- uses: taiki-e/install-action@cross
59+
if: contains(matrix.target, '-musl')
60+
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
61+
if: endsWith(matrix.target, 'windows-msvc')
62+
- uses: taiki-e/upload-rust-binary-action@v1
63+
with:
64+
bin: qv
65+
target: ${{ matrix.target }}
66+
tar: all
67+
zip: windows
68+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)