File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Rust Binary
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ branches :
9+ - main
10+
11+ jobs :
12+ build :
13+ runs-on : macos-latest
14+
15+ strategy :
16+ matrix :
17+ architecture : [x86_64-apple-darwin, aarch64-apple-darwin]
18+
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v2
22+
23+ - name : Set up Rust
24+ uses : actions-rust-lang/setup-rust-toolchain@v1
25+ with :
26+ profile : minimal
27+ target : ${{ matrix.architecture }}
28+ toolchain : stable
29+
30+ - name : Build Rust binary
31+ run : cargo build --release --target ${{ matrix.architecture }}
32+
33+ - name : Rename binary
34+ run : mv target/${{ matrix.architecture }}/release/worktimers target/${{ matrix.architecture }}/release/worktimers-darwin-${{ matrix.architecture }}
35+
36+ - name : Upload binary
37+ uses : softprops/action-gh-release@v2
38+ with :
39+ files : target/${{ matrix.architecture }}/release/worktimers-darwin-${{ matrix.architecture }}
40+ tag_name : v1.0.${{ github.run_number }}
41+ env :
42+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments