-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (79 loc) · 2.43 KB
/
release.yml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: release
# Only do the release on x.y.z tags.
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
# We need this to be able to create releases.
permissions:
contents: write
jobs:
release:
name: Release - ${{ matrix.platform.os-name }}
strategy:
matrix:
platform:
- os-name: freebsd-x86_64
runs-on: ubuntu-latest
target: x86_64-unknown-freebsd
command: build
strip: true
- os-name: linux-x86_64
runs-on: ubuntu-latest
target: x86_64-unknown-linux-gnu
command: both
strip: true
- os-name: linux-x86_64-musl
runs-on: ubuntu-latest
target: x86_64-unknown-linux-musl
command: both
strip: true
- os-name: linux-aarch64
runs-on: ubuntu-latest
target: aarch64-unknown-linux-gnu
command: both
strip: true
- os-name: linux-aarch64-musl
runs-on: ubuntu-latest
target: aarch64-unknown-linux-musl
command: both
strip: true
- os-name: windows-x86_64
runs-on: windows-latest
target: x86_64-pc-windows-msvc
command: both
strip: true
- os-name: windows-aarch64
runs-on: windows-latest
target: aarch64-pc-windows-msvc
command: build
strip: true
- os-name: macos-x86_64
runs-on: macOS-latest
target: x86_64-apple-darwin
command: both
strip: true
- os-name: macos-aarch64
runs-on: macOS-latest
target: aarch64-apple-darwin
command: both
strip: true
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: Publish artifacts and release
uses: houseabsolute/actions-rust-release@v0
with:
executable-name: cnova
target: ${{ matrix.platform.target }}
changes-file: "CHANGELOG.md"
release-tag-prefix: "v"
if: matrix.toolchain != 'beta' && matrix.toolchain != 'nightly'