Skip to content

Commit fe8e9db

Browse files
Create release.yml
1 parent 4f08d97 commit fe8e9db

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/release.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
release:
15+
name: Release - ${{ matrix.platform.release_for }}
16+
strategy:
17+
matrix:
18+
platform:
19+
- os_name: Linux-x86_64
20+
os: ubuntu-20.04
21+
target: x86_64-unknown-linux-musl
22+
23+
- os_name: macOS-x86_64
24+
os: macOS-latest
25+
target: x86_64-apple-darwin
26+
27+
# more release targets here ...
28+
29+
runs-on: ${{ matrix.platform.os }}
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v3
33+
- name: Build executable
34+
uses: houseabsolute/actions-rust-cross@v0
35+
with:
36+
target: ${{ matrix.platform.target }}
37+
args: "--locked --release"
38+
strip: true
39+
- name: Publish artifacts and release
40+
uses: houseabsolute/actions-rust-release@v0
41+
with:
42+
executable-name: disk_usage_endpoint
43+
target: ${{ matrix.platform.target }}
44+
if: matrix.toolchain == 'stable'

0 commit comments

Comments
 (0)