-
Notifications
You must be signed in to change notification settings - Fork 58
61 lines (51 loc) · 1.66 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (51 loc) · 1.66 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on:
release:
types: [created]
permissions:
contents: write
jobs:
release:
name: Release on ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
os: macos-latest
suffix: ""
- target: aarch64-apple-darwin
os: macos-latest
suffix: ""
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-latest
suffix: ""
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
suffix: ""
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
suffix: ""
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
target: ${{ matrix.target }}
toolchain: 1.95.0
args: "--locked --release --bin wastebin --bin wastebin-ctl"
strip: true
- name: Prepare assets
shell: bash
run: |
mv target/${{ matrix.target }}/release/wastebin{,-ctl}${{ matrix.suffix }} .
tar --zstd -cf wastebin_${{ github.event.release.tag_name }}_${{ matrix.target }}.tar.zst LICENSE README.md wastebin{,-ctl}${{ matrix.suffix }}
- name: Upload to Release
uses: softprops/action-gh-release@v2
with:
files: wastebin_${{ github.event.release.tag_name }}_${{ matrix.target }}.tar.zst
# see https://stackoverflow.com/a/69919067
tag_name: ${{ github.event.release.tag_name }}
prerelease: false
make_latest: true