@@ -153,3 +153,42 @@ jobs:
153
153
with :
154
154
files : dist/*.dmg
155
155
token : ${{ secrets.GITHUB_TOKEN }}
156
+
157
+ aur-updater :
158
+ strategy :
159
+ fail-fast : false
160
+ matrix :
161
+ pkgname :
162
+ - mihomo-party-bin
163
+ - mihomo-party
164
+ if : startsWith(github.ref, 'refs/tags/v')
165
+ needs : linux
166
+ runs-on : ubuntu-latest
167
+ steps :
168
+ - name : Update Version
169
+ run : |
170
+ sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/mihomo-party-bin/PKGBUILD
171
+ sed -i "s/pkgver=.*/pkgver=$(echo ${{ github.ref }} | tr -d 'refs/tags/v')/" aur/mihomo-party/PKGBUILD
172
+ - name : Update Checksums
173
+ if : ${{ matrix.pkgname == 'mihomo-party' }}
174
+ run : |
175
+ wget https://github.com/pompurin404/mihomo-party/archive/refs/tags/$(echo ${{ github.ref }} | tr -d 'refs/tags/').tar.gz -O release.tar.gz
176
+ sed -i "s/sha256sums=.*/sha256sums=(\"$(sha256sum ./release.tar.gz | awk '{print $1}')\")/" aur/mihomo-party/PKGBUILD
177
+ - name : Update Checksums
178
+ if : ${{ matrix.pkgname == 'mihomo-party-bin' }}
179
+ run : |
180
+ wget https://github.com/pompurin404/mihomo-party/releases/download/$(echo ${{ github.ref }} | tr -d 'refs/tags/')/mihomo-party-linux$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-amd64.deb -O amd64.deb
181
+ wget https://github.com/pompurin404/mihomo-party/releases/download/$(echo ${{ github.ref }} | tr -d 'refs/tags/')/mihomo-party-linux$(echo ${{ github.ref }} | tr -d 'refs/tags/v')-arm64.deb -O arm64.deb
182
+ sed -i "s/sha256sums_x86_64=.*/sha256sums_x86_64=(\"$(sha256sum ./amd64.deb | awk '{print $1}')\")/" aur/mihomo-party-bin/PKGBUILD
183
+ sed -i "s/sha256sums_aarch64=.*/sha256sums_aarch64=(\"$(sha256sum ./arm64.deb | awk '{print $1}')\")/" aur/mihomo-party-bin/PKGBUILD
184
+ - name : Publish AUR package
185
+ uses : KSXGitHub/github-actions-deploy-aur@v2.7.2
186
+ with :
187
+ pkgname : ${{ matrix.pkgname }}
188
+ pkgbuild : aur/${{ matrix.pkgname }}/PKGBUILD
189
+ commit_username : pompurin404
190
+ commit_email : pompurin404@mihomo.party
191
+ ssh_private_key : ${{ secrets.PRIVATE_KEY }}
192
+ commit_message : Update AUR package
193
+ ssh_keyscan_types : rsa,ed25519
194
+ allow_empty_commits : false
0 commit comments