Compare commits

..

2 Commits

Author SHA1 Message Date
9666b73222 Purge CDN after a new release (#45)
Co-authored-by: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com>
2021-08-28 19:31:31 +08:00
3231f9422a Fix: degrade to fix upload 2021-08-09 19:11:26 +08:00

View File

@ -103,7 +103,7 @@ jobs:
install -p {apple,icloud,google,proxy,direct,reject,private,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/ install -p {apple,icloud,google,proxy,direct,reject,private,gfw,greatfire,tld-not-cn,cncidr,lancidr,telegramcidr}.txt ./publish/
- name: Release and upload assets - name: Release and upload assets
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v0.1.6
with: with:
name: ${{ env.RELEASE_NAME }} name: ${{ env.RELEASE_NAME }}
tag_name: ${{ env.TAG_NAME }} tag_name: ${{ env.TAG_NAME }}
@ -116,7 +116,7 @@ jobs:
- name: Git push assets to "release" branch - name: Git push assets to "release" branch
run: | run: |
cd publish cd publish || exit 1
git init git init
git config --local user.name "github-actions[bot]" git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
@ -125,3 +125,10 @@ jobs:
git commit -m "${{ env.RELEASE_NAME }}" git commit -m "${{ env.RELEASE_NAME }}"
git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
git push -f origin release git push -f origin release
- name: Purge jsdelivr CDN
run: |
cd publish || exit 1
for file in $(ls); do
curl -i "https://purge.jsdelivr.net/gh/${{ github.repository }}@release/${file}"
done