@@ -202,6 +202,22 @@ jobs:
202202 sha256sum geosite.dat > geosite.dat.sha256sum
203203 sha256sum rules.zip > rules.zip.sha256sum
204204
205+ - name : Generate sing-box RULE-SET format
206+ env :
207+ LOCAL_GEOSITE_PATH : ../publish/geosite.dat
208+ run : |
209+ cd sing-geosite || exit 1
210+ go run -v .
211+
212+ - name : Collect sing-box outputs and make sha256sum
213+ run : |
214+ mkdir -p sing-output
215+ cp -r sing-geosite/rule-set sing-output/
216+ cp -r sing-geosite/rule-set-unstable sing-output/
217+ sha256sum sing-geosite/geosite.db > sing-geosite/geosite.db.sha256sum
218+ sha256sum sing-geosite/geosite-cn.db > sing-geosite/geosite-cn.db.sha256sum
219+ cp sing-geosite/geosite* ./publish
220+
205221 - name : Release and upload assets
206222 uses : svenstaro/upload-release-action@v2
207223 with :
@@ -214,6 +230,25 @@ jobs:
214230 - name : Move FATIcensor to publish folder
215231 run : |
216232 install -p ./custom/publish/faticensor.txt ./publish/
233+
234+ - name : Git push assets to "release" branch
235+ run : |
236+ cd publish || exit 1
237+ git init
238+ git config --local user.name "github-actions[bot]"
239+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
240+ git checkout -b release
241+ git add .
242+ git commit -m "${{ env.RELEASE_NAME }}"
243+ git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
244+ git push -f -u origin release
245+
246+ - name : Purge jsdelivr CDN
247+ run : |
248+ cd publish || exit 1
249+ for file in $(ls); do
250+ curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
251+ done
217252
218253 - name : Generate plaintext and Convert to the rules of AdGuard format
219254 run : |
@@ -266,22 +301,6 @@ jobs:
266301 git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
267302 git push -f -u origin clash
268303 rm -rf .git
269-
270- - name : Generate sing-box RULE-SET format
271- env :
272- LOCAL_GEOSITE_PATH : ../publish/geosite.dat
273- run : |
274- cd sing-geosite || exit 1
275- go run -v .
276-
277- - name : Collect sing-box outputs and make sha256sum
278- run : |
279- mkdir -p sing-output
280- cp -r sing-geosite/rule-set sing-output/
281- cp -r sing-geosite/rule-set-unstable sing-output/
282- sha256sum sing-geosite/geosite.db > sing-geosite/geosite.db.sha256sum
283- sha256sum sing-geosite/geosite-cn.db > sing-geosite/geosite-cn.db.sha256sum
284- cp sing-geosite/geosite* ./publish
285304
286305 - name : Git push assets to "sing-box" branch
287306 run : |
@@ -296,22 +315,3 @@ jobs:
296315 git push -f -u origin sing-box
297316 rm -rf .git
298317
299- - name : Git push assets to "release" branch
300- run : |
301- cd publish || exit 1
302- git init
303- git config --local user.name "github-actions[bot]"
304- git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
305- git checkout -b release
306- git add .
307- git commit -m "${{ env.RELEASE_NAME }}"
308- git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
309- git push -f -u origin release
310-
311- - name : Purge jsdelivr CDN
312- run : |
313- cd publish || exit 1
314- for file in $(ls); do
315- curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
316- done
317-
0 commit comments