|
7 | 7 |
|
8 | 8 | jobs:
|
9 | 9 | build-release:
|
10 |
| - name: ${{ matrix.targets.target }}@${{ matrix.targets.os }} |
| 10 | + name: ${{ matrix.targets.alias }} |
11 | 11 | runs-on: ${{ matrix.targets.os }}
|
12 | 12 |
|
13 | 13 | strategy:
|
14 | 14 | fail-fast: false
|
15 | 15 | matrix:
|
16 | 16 | targets:
|
17 |
| - - { os: macos-11 , target: aarch64-apple-darwin } |
18 |
| - - { os: macos-12 , target: aarch64-apple-darwin } |
19 |
| - - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu } |
20 |
| - - { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu } |
21 |
| - - { os: windows-2019, target: x86_64-pc-windows-msvc } |
22 |
| - - { os: windows-2022, target: x86_64-pc-windows-msvc } |
| 17 | + - { os: macos-11 , target: aarch64-apple-darwin , alias: aarch64-macos-11 } |
| 18 | + - { os: macos-12 , target: aarch64-apple-darwin , alias: aarch64-macos-12 } |
| 19 | + - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu, alias: amd64-ubuntu-2004 } |
| 20 | + - { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu, alias: amd64-ubuntu-2204 } |
| 21 | + - { os: windows-2019, target: x86_64-pc-windows-msvc , alias: amd64-windows-2019 } |
| 22 | + - { os: windows-2022, target: x86_64-pc-windows-msvc , alias: amd64-windows-2022 } |
23 | 23 |
|
24 | 24 | steps:
|
25 | 25 | - name: Checkout
|
|
43 | 43 | - name: Setup rust cache
|
44 | 44 | uses: Swatinem/rust-cache@v2
|
45 | 45 | with:
|
46 |
| - prefix-key: ${{ matrix.targets.target }}@${{ matrix.targets.os }} |
| 46 | + prefix-key: ${{ matrix.targets.alias }} |
47 | 47 |
|
48 | 48 | - name: Generate version
|
49 | 49 | id: gen-version
|
|
64 | 64 | - name: Generate artifacts name
|
65 | 65 | id: gen-name
|
66 | 66 | shell: bash
|
67 |
| - run: echo 'NAME=${{ matrix.targets.target }}@${{ matrix.targets.os }}' >> $GITHUB_OUTPUT |
| 67 | + run: echo 'NAME=release-${{ matrix.targets.alias }}' >> $GITHUB_OUTPUT |
68 | 68 |
|
69 | 69 | - name: Generate binary extension
|
70 | 70 | id: gen-ext
|
|
76 | 76 | uses: actions/upload-artifact@v3
|
77 | 77 | with:
|
78 | 78 | name: ${{ steps.gen-name.outputs.NAME }}
|
79 |
| - path: './target/${{ matrix.targets.target }}/release/cnb${{ steps.gen-ext.outputs.EXT }}' |
| 79 | + path: ./target/${{ matrix.targets.target }}/release/cnb${{ steps.gen-ext.outputs.EXT }} |
80 | 80 | if-no-files-found: error
|
| 81 | + |
| 82 | + - name: Create github release |
| 83 | + uses: softprops/action-gh-release@v1 |
| 84 | + with: |
| 85 | + files: ./target/${{ matrix.targets.target }}/release/cnb${{ steps.gen-ext.outputs.EXT }} |
| 86 | + |
0 commit comments