-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor build workflow to use AWS CLI for Cloudflare R2 uploads
- Loading branch information
1 parent
7f90658
commit 2aad3f3
Showing
1 changed file
with
7 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,18 +96,13 @@ jobs: | |
- dir: macos | ||
- dir: windows | ||
|
||
steps: | ||
- name: Download all artifacts | ||
uses: actions/download-artifact@v2 | ||
- name: Configure AWS CLI | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
path: artifacts | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: auto # Cloudflare R2 does not require a specific AWS region, but this field is required by this action | ||
|
||
- name: Upload to Cloudflare R2 | ||
uses: ryand56/[email protected] | ||
with: | ||
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} | ||
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
r2-bucket: geph5 | ||
source-dir: artifacts/${{ matrix.dir }}-latest | ||
destination-dir: ./${{ matrix.dir }}-latest | ||
run: | | ||
aws s3 cp ./artifacts/${{ matrix.dir }}-latest s3://geph5/${{ matrix.dir }}-latest --recursive --endpoint-url=https://b5e397a549f0e6543dba8e1d83ca9924.r2.cloudflarestorage.com/ |