Skip to content

Commit

Permalink
ci: fix download releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Markson Hon committed Feb 22, 2024
1 parent aff98da commit 43f9b81
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
echo "Use tar to generate web.tar.gz..."
tar -zcvf web.tar.gz web/
- name: Upload Zip File to Artifacts
uses: actions/download-artifact@v4.1.2
uses: actions/upload-artifact@v4.3.1
with:
path: web/*
name: web
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/release_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
echo "Use tar to generate web.tar.gz..."
tar -zcvf web.tar.gz web/
- name: Upload Zip File to Artifacts
uses: actions/download-artifact@v4.1.2
uses: actions/upload-artifact@v4.3.1
with:
path: web/*
name: web
Expand Down Expand Up @@ -423,11 +423,14 @@ jobs:
Move-Item ./web.zip ./release/web.zip
Move-Item ./web.zip.sha256.txt ./release/web.zip.sha256.txt
- name: Upload Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.prep.outputs.VERSION }}
files: |
release/*
run: |
Latest_Releases=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/v2rayA/v2rayA/releases/latest | jq -r '.tag_name')
Latest_tag=v${{ steps.prep.outputs.VERSION }}
if [ "$Latest_Releases" != "$Latest_tag" ]; then
gh release create "v${{ steps.prep.outputs.VERSION }}" -t "v${{ steps.prep.outputs.VERSION }}" \
--notes "Release v${{ steps.prep.outputs.VERSION }}"
fi
gh release upload "v${{ steps.prep.outputs.VERSION }}" release/*
- name: Refresh Cloudflare Cache
env:
CF_AUTH_EMAIL: ${{ secrets.CF_AUTH_EMAIL }}
Expand Down

0 comments on commit 43f9b81

Please sign in to comment.