|
3 | 3 | push:
|
4 | 4 | branches:
|
5 | 5 | - master
|
| 6 | + tags: |
| 7 | + - v* |
| 8 | + |
6 | 9 | permissions: write-all
|
7 | 10 |
|
8 | 11 | jobs:
|
@@ -33,16 +36,30 @@ jobs:
|
33 | 36 | pnpm install
|
34 | 37 | pnpm prepare --${{ matrix.arch }}
|
35 | 38 | - name: Build
|
36 |
| - env: |
37 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
38 | 39 | run: pnpm build:win --${{ matrix.arch }}
|
39 |
| - |
40 | 40 | - name: Upload Artifacts
|
41 | 41 | uses: actions/upload-artifact@v4
|
42 | 42 | with:
|
43 | 43 | name: Windows ${{ matrix.arch }}
|
44 | 44 | path: dist/*.exe
|
45 | 45 | if-no-files-found: error
|
| 46 | + - name: Publish Release |
| 47 | + if: startsWith(github.ref, 'refs/tags/v') |
| 48 | + uses: softprops/action-gh-release@v2 |
| 49 | + with: |
| 50 | + files: | |
| 51 | + dist/*.exe |
| 52 | + dist/*.blockmap |
| 53 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 54 | + - name: Merge Yaml |
| 55 | + if: startsWith(github.ref, 'refs/tags/v') |
| 56 | + run: pnpm updater latest.yml |
| 57 | + - name: Publish Release |
| 58 | + if: startsWith(github.ref, 'refs/tags/v') |
| 59 | + uses: softprops/action-gh-release@v2 |
| 60 | + with: |
| 61 | + files: dist/latest.yml |
| 62 | + token: ${{ secrets.GITHUB_TOKEN }} |
46 | 63 |
|
47 | 64 | linux:
|
48 | 65 | strategy:
|
|
70 | 87 | pnpm install
|
71 | 88 | pnpm prepare --${{ matrix.arch }}
|
72 | 89 | - name: Build
|
73 |
| - env: |
74 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
75 | 90 | run: pnpm build:linux --${{ matrix.arch }}
|
76 |
| - |
77 | 91 | - name: Upload Artifacts
|
78 | 92 | uses: actions/upload-artifact@v4
|
79 | 93 | with:
|
|
82 | 96 | dist/*.deb
|
83 | 97 | dist/*.rpm
|
84 | 98 | if-no-files-found: error
|
| 99 | + - name: Publish Release |
| 100 | + if: startsWith(github.ref, 'refs/tags/v') |
| 101 | + uses: softprops/action-gh-release@v2 |
| 102 | + with: |
| 103 | + files: | |
| 104 | + dist/*.deb |
| 105 | + dist/*.rpm |
| 106 | + dist/*.blockmap |
| 107 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 108 | + - name: Merge Yaml |
| 109 | + if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'x64' |
| 110 | + run: pnpm updater latest-linux.yml |
| 111 | + - name: Merge Yaml |
| 112 | + if: startsWith(github.ref, 'refs/tags/v') && matrix.arch == 'arm64' |
| 113 | + run: pnpm updater latest-linux-arm64.yml |
| 114 | + - name: Publish Release |
| 115 | + if: startsWith(github.ref, 'refs/tags/v') |
| 116 | + uses: softprops/action-gh-release@v2 |
| 117 | + with: |
| 118 | + files: | |
| 119 | + dist/latest-linux.yml |
| 120 | + dist/latest-linux-arm64.yml |
| 121 | + token: ${{ secrets.GITHUB_TOKEN }} |
85 | 122 |
|
86 | 123 | macos:
|
87 | 124 | strategy:
|
@@ -119,3 +156,21 @@ jobs:
|
119 | 156 | name: MacOS ${{ matrix.arch }}
|
120 | 157 | path: dist/*.dmg
|
121 | 158 | if-no-files-found: error
|
| 159 | + - name: Publish Release |
| 160 | + if: startsWith(github.ref, 'refs/tags/v') |
| 161 | + uses: softprops/action-gh-release@v2 |
| 162 | + with: |
| 163 | + files: | |
| 164 | + dist/*.dmg |
| 165 | + dist/*.zip |
| 166 | + dist/*.blockmap |
| 167 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 168 | + - name: Merge Yaml |
| 169 | + if: startsWith(github.ref, 'refs/tags/v') |
| 170 | + run: pnpm updater latest-mac.yml |
| 171 | + - name: Publish Release |
| 172 | + if: startsWith(github.ref, 'refs/tags/v') |
| 173 | + uses: softprops/action-gh-release@v2 |
| 174 | + with: |
| 175 | + files: dist/latest-mac.yml |
| 176 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments