feat: migrate all downloads to R2 CDN with race_download
- Remove update.hwdns.net proxy, add dl.dbxio.com R2 CDN - Remove deprecated race_github_proxies, replace with race_download - Update Tauri updater endpoints to prioritize R2 - Migrate update check, JDBC plugin download to race_download - Add R2 upload job to publish-packages workflow
This commit is contained in:
1 parent
242720cc3c
commit
febfbdb5a5
4 files changed
+46
-38
No files matched your search
@@ -215,3 +215,43 @@ jobs:
|
||||
git push
|
||||
echo "::notice::Scoop manifest updated to ${VERSION}"
|
||||
fi
|
||||
|
||||
upload-r2:
|
||||
name: Upload to R2
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (!github.event.release.draft && !github.event.release.prerelease) }}
|
||||
steps:
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: |
|
||||
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
|
||||
TAG="$(echo "${TAG}" | xargs)"
|
||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Download release assets
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
mkdir -p assets
|
||||
gh release download "${{ steps.version.outputs.tag }}" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--dir assets \
|
||||
--clobber
|
||||
ls -lh assets/
|
||||
|
||||
- name: Upload to R2 (versioned)
|
||||
run: |
|
||||
aws s3 sync ./assets "s3://${{ secrets.R2_BUCKET_NAME }}/releases/${{ steps.version.outputs.tag }}/" \
|
||||
--endpoint-url "https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com"
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
|
||||
- name: Upload to R2 (latest)
|
||||
run: |
|
||||
aws s3 sync ./assets "s3://${{ secrets.R2_BUCKET_NAME }}/releases/latest/" \
|
||||
--endpoint-url "https://${{ secrets.R2_ACCOUNT_ID }}.r2.cloudflarestorage.com" \
|
||||
--delete
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
Reference in new issue
Block a user