Skip to content

Commit

Permalink
add R2 upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-sz committed Jan 11, 2025
1 parent d18ca43 commit 5b94ade
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,9 @@ jobs:
cd python
tar -cf - * | brotli -6 > /tmp/${{ env.artifact_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
- name: Upload artifact to R2
uses: cloudflare/wrangler-action@v3
with:
name: ${{ env.artifact_name }}
path: /tmp/${{ env.artifact_name }}
compression-level: 0

release:
runs-on: ubuntu-latest
permissions:
contents: write

needs:
- build

steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true

- uses: ncipollo/release-action@v1
with:
artifacts: '*.br'
apiToken: ${{ secrets.CF_TOKEN }}
accountId: ${{ secrets.CF_ID }}
command: r2 object put ${{ secrets.S3_BUCKET }}/${{ secrets.S3_PREFIX }}/${{ github.ref_name }}/${{ env.artifact_name }} --file=/tmp/${{ env.artifact_name }}

0 comments on commit 5b94ade

Please sign in to comment.