|
17 | 17 | steps: |
18 | 18 | - name: Get git tag version |
19 | 19 | id: get_version |
20 | | - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 20 | + # run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 21 | + run: echo "name=VERSION::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
21 | 22 | - name: Checkout |
22 | 23 | uses: actions/checkout@v2 |
23 | 24 | with: |
|
48 | 49 | steps: |
49 | 50 | - name: Get git tag version |
50 | 51 | id: get_version |
51 | | - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 52 | + # run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 53 | + run: echo "name=VERSION::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
52 | 54 | - name: Checkout |
53 | 55 | uses: actions/checkout@v2 |
54 | 56 | with: |
|
83 | 85 | steps: |
84 | 86 | - name: Get git tag version |
85 | 87 | id: get_version |
86 | | - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 88 | + # run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 89 | + run: echo "name=VERSION::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
87 | 90 | shell: bash |
88 | 91 | - name: Checkout |
89 | 92 | uses: actions/checkout@v2 |
@@ -123,14 +126,47 @@ jobs: |
123 | 126 | target\release\${{ env.PACKAGE_NAME }}-${{ steps.get_version.outputs.VERSION }}-${{ env.target }}.zip |
124 | 127 | env: |
125 | 128 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
126 | | - build-mac: |
| 129 | + build-macos-x86: |
127 | 130 | runs-on: macos-latest |
128 | 131 | env: |
129 | 132 | target: x86_64-apple-darwin |
130 | 133 | steps: |
131 | 134 | - name: Get git tag version |
132 | 135 | id: get_version |
133 | | - run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 136 | + # run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 137 | + run: echo "name=VERSION::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
| 138 | + - name: Checkout |
| 139 | + uses: actions/checkout@v2 |
| 140 | + with: |
| 141 | + submodules: recursive |
| 142 | + - name: Install toolchain |
| 143 | + uses: actions-rs/toolchain@v1 |
| 144 | + with: |
| 145 | + toolchain: stable |
| 146 | + target: ${{ env.target }} |
| 147 | + default: true |
| 148 | + override: true |
| 149 | + - name: Build |
| 150 | + run: cargo build --release && strip target/release/${{ env.PACKAGE_NAME }} |
| 151 | + - name: Zip |
| 152 | + run: tar czvf target/release/${{ env.PACKAGE_NAME }}-${{ steps.get_version.outputs.VERSION }}-${{ env.target }}.tar.gz --directory=target/release ${{ env.PACKAGE_NAME }} |
| 153 | + - name: Release |
| 154 | + uses: softprops/action-gh-release@v1 |
| 155 | + if: startsWith(github.ref, 'refs/tags/') |
| 156 | + with: |
| 157 | + files: | |
| 158 | + target/release/${{ env.PACKAGE_NAME }}-${{ steps.get_version.outputs.VERSION }}-${{ env.target }}.tar.gz |
| 159 | + env: |
| 160 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 161 | + build-macos-arm: |
| 162 | + runs-on: macos-latest |
| 163 | + env: |
| 164 | + target: aarch64-apple-darwin |
| 165 | + steps: |
| 166 | + - name: Get git tag version |
| 167 | + id: get_version |
| 168 | + # run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} |
| 169 | + run: echo "name=VERSION::${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
134 | 170 | - name: Checkout |
135 | 171 | uses: actions/checkout@v2 |
136 | 172 | with: |
|
0 commit comments