|
6 | 6 | # - https://github.com/motemen/hwatch/blob/97d3745dcc8931a1d75217573d5ca60705be632f/.github/workflows/release.yml |
7 | 7 | # - https://github.com/greymd/teip/blob/master/.github/workflows/release.yml |
8 | 8 |
|
9 | | - |
10 | 9 | name: Release Job. |
11 | 10 |
|
12 | 11 | on: |
13 | 12 | push: |
14 | 13 | branches: |
15 | 14 | - master |
16 | 15 | paths-ignore: |
17 | | - - '**/README.md' |
| 16 | + - "**/README.md" |
18 | 17 |
|
19 | 18 | jobs: |
20 | 19 | # build rust binary |
|
40 | 39 | - target: aarch64-apple-darwin |
41 | 40 | os: macos-latest |
42 | 41 | ext: tar.gz |
43 | | - # - target: x86_64-pc-windows-gnu |
44 | | - # os: ubuntu-latest |
45 | | - # ext: zip |
| 42 | + - target: x86_64-pc-windows-gnu |
| 43 | + os: ubuntu-latest |
| 44 | + ext: zip |
46 | 45 | runs-on: ${{ matrix.os }} |
47 | 46 | steps: |
48 | 47 | - uses: actions/checkout@v1 |
@@ -105,6 +104,12 @@ jobs: |
105 | 104 | perl -i -pe s/___VERSION___/${{ steps.package_version.outputs.version }}/ ./package/.tar2package.yml |
106 | 105 | tar czvf "$_TAR" -C "$PWD/package" completion bin man .tar2package.yml |
107 | 106 |
|
| 107 | + - name: Create package file |
| 108 | + if: ${{ (matrix.ext == 'zip') }} |
| 109 | + run: | |
| 110 | + _ZIP=hwatch-${{ steps.package_version.outputs.version }}.${{ matrix.target }}.zip |
| 111 | + 7z a "$_ZIP" target/${{ matrix.target }}/release/hwatch.exe |
| 112 | +
|
108 | 113 | # use: https://github.com/greymd/tar2package |
109 | 114 | - name: Build rpm |
110 | 115 | id: rpm |
@@ -154,6 +159,13 @@ jobs: |
154 | 159 | name: build-${{ matrix.target }} |
155 | 160 | path: hwatch-${{ steps.package_version.outputs.version }}.${{ matrix.target }}.tar.gz |
156 | 161 |
|
| 162 | + - name: Upload artifact |
| 163 | + if: matrix.ext == 'zip' |
| 164 | + uses: actions/upload-artifact@v1 |
| 165 | + with: |
| 166 | + name: build-${{ matrix.target }} |
| 167 | + path: hwatch-${{ steps.package_version.outputs.version }}.${{ matrix.target }}.zip |
| 168 | + |
157 | 169 | # create package release |
158 | 170 | create-release: |
159 | 171 | needs: |
@@ -211,7 +223,9 @@ jobs: |
211 | 223 | - target: aarch64-apple-darwin |
212 | 224 | os: macos-latest |
213 | 225 | ext: tar.gz |
214 | | - # - x86_64-pc-windows-gnu |
| 226 | + - target: x86_64-pc-windows-gnu |
| 227 | + os: ubuntu-latest |
| 228 | + ext: zip |
215 | 229 | needs: [create-release] |
216 | 230 | runs-on: ubuntu-latest |
217 | 231 | steps: |
|
0 commit comments