|
1 | 1 | on: |
2 | | - release: |
3 | | - types: [created] |
| 2 | + push: |
| 3 | + tags: |
| 4 | + - "v*.*.*" |
4 | 5 |
|
5 | 6 | name: Release artifacts |
6 | 7 |
|
7 | 8 | jobs: |
8 | 9 | release: |
9 | | - name: release ${{ matrix.target }} |
| 10 | + name: Compile and release |
10 | 11 | runs-on: ubuntu-latest |
11 | | - strategy: |
12 | | - fail-fast: false |
13 | | - matrix: |
14 | | - include: |
15 | | - - target: x86_64-pc-windows-gnu |
16 | | - archive: zip |
17 | | - - target: x86_64-unknown-linux-musl |
18 | | - archive: tar.gz tar.xz tar.zst |
19 | | - - target: x86_64-apple-darwin |
20 | | - archive: zip |
21 | 12 | steps: |
22 | 13 | - uses: actions/checkout@master |
23 | | - - name: Compile and release |
| 14 | + - name: Compile target x86_64-unknown-linux-musl |
| 15 | + id: linux_musl |
| 16 | + uses: rust-build/rust-build.action@v1.4.0 |
| 17 | + env: |
| 18 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 19 | + with: |
| 20 | + RUSTTARGET: "x86_64-unknown-linux-musl" |
| 21 | + ARCHIVE_TYPES: "tar.gz tar.xz tar.zst" |
| 22 | + UPLOAD_MODE: none |
| 23 | + EXTRA_FILES: "README.md LICENSE" |
| 24 | + - name: Compile target x86_64-apple-darwin |
| 25 | + id: apple |
24 | 26 | uses: rust-build/rust-build.action@v1.4.0 |
25 | 27 | env: |
26 | 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
27 | 29 | with: |
28 | | - RUSTTARGET: ${{ matrix.target }} |
29 | | - ARCHIVE_TYPES: ${{ matrix.archive }} |
| 30 | + RUSTTARGET: "x86_64-apple-darwin" |
| 31 | + ARCHIVE_TYPES: zip |
30 | 32 | UPLOAD_MODE: none |
31 | | - - name: Upload artifact |
32 | | - uses: actions/upload-artifact@v3 |
| 33 | + - name: Compile target x86_64-pc-windows-gnu |
| 34 | + id: windows |
| 35 | + uses: rust-build/rust-build.action@v1.4.0 |
| 36 | + env: |
| 37 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 38 | + with: |
| 39 | + RUSTTARGET: "x86_64-pc-windows-gnu" |
| 40 | + ARCHIVE_TYPES: zip |
| 41 | + UPLOAD_MODE: none |
| 42 | + - name: "✏️ Generate release changelog" |
| 43 | + id: changelog |
| 44 | + uses: heinrichreimer/github-changelog-generator-action@v2.3 |
| 45 | + with: |
| 46 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + - name: Release |
| 48 | + uses: softprops/action-gh-release@v1 |
33 | 49 | with: |
34 | | - name: Binary |
35 | | - path: | |
36 | | - ${{ steps.compile.outputs.BUILT_ARCHIVE }} |
37 | | - ${{ steps.compile.outputs.BUILT_CHECKSUM }} |
| 50 | + body: ${{steps.changelog.outputs.changelog}} |
| 51 | + files: | |
| 52 | + ${{ steps.linux_musl.outputs.BUILT_ARCHIVE }} |
| 53 | + ${{ steps.linux_musl.outputs.BUILT_CHECKSUM }} |
| 54 | + ${{ steps.apple.outputs.BUILT_ARCHIVE }} |
| 55 | + ${{ steps.apple.outputs.BUILT_CHECKSUM }} |
| 56 | + ${{ steps.windows.outputs.BUILT_ARCHIVE }} |
| 57 | + ${{ steps.windows.outputs.BUILT_CHECKSUM }} |
| 58 | + README.md |
| 59 | + LICENSE |
0 commit comments