File tree Expand file tree Collapse file tree 7 files changed +1246
-0
lines changed
Expand file tree Collapse file tree 7 files changed +1246
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release
2+
3+ on :
4+ push :
5+ tags :
6+ - " v*"
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ include :
15+ - os : ubuntu-latest
16+ target : x86_64-unknown-linux-gnu
17+ artifact : suivanity-linux-x86_64
18+ - os : windows-latest
19+ target : x86_64-pc-windows-msvc
20+ artifact : suivanity-windows-x86_64.exe
21+
22+ runs-on : ${{ matrix.os }}
23+
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - name : Install Rust
28+ uses : dtolnay/rust-toolchain@stable
29+ with :
30+ targets : ${{ matrix.target }}
31+
32+ - name : Build
33+ run : cargo build --release --target ${{ matrix.target }}
34+
35+ - name : Prepare artifact (Linux)
36+ if : runner.os != 'Windows'
37+ run : cp target/${{ matrix.target }}/release/suivanity ${{ matrix.artifact }}
38+
39+ - name : Prepare artifact (Windows)
40+ if : runner.os == 'Windows'
41+ shell : pwsh
42+ run : Copy-Item target/${{ matrix.target }}/release/suivanity.exe ${{ matrix.artifact }}
43+
44+ - name : Upload artifact
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : ${{ matrix.artifact }}
48+ path : ${{ matrix.artifact }}
49+
50+ publish :
51+ if : startsWith(github.ref, 'refs/tags/')
52+ needs : build
53+ runs-on : ubuntu-latest
54+ permissions :
55+ contents : write
56+
57+ steps :
58+ - name : Download artifacts
59+ uses : actions/download-artifact@v4
60+ with :
61+ path : dist
62+
63+ - name : Publish release
64+ uses : softprops/action-gh-release@v2
65+ with :
66+ files : dist/**/suivanity*
Original file line number Diff line number Diff line change 1+ /target /
2+ /dist /
3+ suivanity-linux-x86_64
4+ suivanity-windows-x86_64.exe
5+ * .log
6+ * .tmp
7+ .DS_Store
You can’t perform that action at this time.
0 commit comments