Skip to content

Commit 89cdb20

Browse files
committed
Added release.yaml GH action
1 parent 6bc2c86 commit 89cdb20

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/release.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: release
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
7+
deploy:
8+
name: Deploy
9+
runs-on: ${{ matrix.job.os }}
10+
strategy:
11+
matrix:
12+
job:
13+
- os: ubuntu-latest
14+
target: x86_64-unknown-linux-gnu
15+
- os: ubuntu-latest
16+
target: x86_64-unknown-linux-musl
17+
use-cross: true
18+
- os: macos-latest
19+
target: x86_64-apple-darwin
20+
- os: windows-latest
21+
target: x86_64-pc-windows-msvc
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Build target
25+
uses: actions-rs/cargo@v1
26+
with:
27+
use-cross: ${{ matrix.job.use-cross }}
28+
command: build
29+
args: --release --target ${{ matrix.job.target }}
30+
31+
- name: Strip release binary (linux and macOS)
32+
if: matrix.job.os != 'windows-latest'
33+
run: |
34+
strip "target/${{ matrix.job.target }}/release/xh"
35+
36+
- name: Publish
37+
uses: softprops/action-gh-release@v1
38+
with:
39+
files: 'stackmuncher*'
40+
draft: true
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)