From 8a8d50c15ca811ec5ee18aa43d43a08ba5ad6be2 Mon Sep 17 00:00:00 2001 From: HalfLife <6436073+o0HalfLife0o@users.noreply.github.com> Date: Mon, 9 Aug 2021 22:50:32 +0800 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e6df76098..429321285 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,3 +86,22 @@ jobs: files: ${{ github.workspace }}/apk/*.apk env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push Assets To "release" Branch + run: | + cd $GITHUB_WORKSPACE/apk || exit 1 + git init + git config --local user.name "github-actions[bot]" + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git checkout -b release + git add *.apk + git commit -m "${{ env.RELEASE_NAME }}" + git remote add origin "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}" + git push -f -u origin release + - name: Purge Jsdelivr Cache + run: | + result=$(curl -s https://purge.jsdelivr.net/gh/${{ github.repository }}@release/) + if echo $result |grep -q 'success.*true'; then + echo "jsdelivr缓存更新成功" + else + echo $result + fi