1+ name : Release
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ name : Build Static Linux Binaries
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : musl-tools
14+ run : |
15+ sudo apt-get install musl-tools
16+ - uses : actions/checkout@v2
17+ - uses : actions-rs/toolchain@v1
18+ with :
19+ toolchain : stable
20+ target : x86_64-unknown-linux-musl
21+ - uses : Swatinem/rust-cache@v1
22+ - uses : actions-rs/cargo@v1
23+ with :
24+ command : build
25+ args : --release --all --target x86_64-unknown-linux-musl
26+ - uses : svenstaro/upload-release-action@v2
27+ with :
28+ repo_token : ${{ secrets.GITHUB_TOKEN }}
29+ file : target/x86_64-unknown-linux-musl/release/espflash
30+ asset_name : espflash
31+ tag : ${{ github.ref }}
32+ - uses : svenstaro/upload-release-action@v2
33+ with :
34+ repo_token : ${{ secrets.GITHUB_TOKEN }}
35+ file : target/x86_64-unknown-linux-musl/release/cargo-espflash
36+ asset_name : cargo-espflash
37+ tag : ${{ github.ref }}
38+
39+ build-windows :
40+ name : Build Static Windows Binaries
41+ runs-on : ubuntu-latest
42+
43+ steps :
44+ - uses : actions/checkout@v2
45+ - uses : actions-rs/toolchain@v1
46+ with :
47+ toolchain : stable
48+ target : x86_64-pc-windows-gnu
49+ - uses : Swatinem/rust-cache@v1
50+ - uses : actions-rs/cargo@v1
51+ with :
52+ use-cross : true
53+ command : build
54+ args : --release --all --target x86_64-pc-windows-gnu
55+ - uses : svenstaro/upload-release-action@v2
56+ with :
57+ repo_token : ${{ secrets.GITHUB_TOKEN }}
58+ file : target/x86_64-pc-windows-gnu/release/espflash.exe
59+ asset_name : espflash.exe
60+ tag : ${{ github.ref }}
61+ - uses : svenstaro/upload-release-action@v2
62+ with :
63+ repo_token : ${{ secrets.GITHUB_TOKEN }}
64+ file : target/x86_64-pc-windows-gnu/release/cargo-espflash.exe
65+ asset_name : cargo-espflash.exe
66+ tag : ${{ github.ref }}
0 commit comments