Skip to content

Commit

Permalink
Add go-sm builds upload to R2
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-spacemesh committed Aug 7, 2024
1 parent 00d476f commit 030ee7e
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,27 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
version: "469.0.0"
- name: Upload zip
- name: Upload zip to GCP
uses: google-github-actions/upload-cloud-storage@v2
with:
path: ${{ env.OUTNAME }}.zip
destination: ${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/
- name: Copy build
shell: bash
run: |
mkdir build-zip
cp ${{ env.OUTNAME }}.zip build-zip
- name: Upload zip to R2
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_SECRET_ACCESS_KEY }}
SOURCE_DIR: build-zip
DEST_DIR: '${{ github.ref_name }}'
AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
- name: Install coreutils
if: ${{ matrix.os == 'macos-13' || matrix.os == '[self-hosted, macOS, ARM64, go-spacemesh]' }}
run: brew install coreutils
Expand Down Expand Up @@ -143,11 +159,27 @@ jobs:
uses: google-github-actions/setup-gcloud@v2
with:
version: "469.0.0"
- name: Upload sha256sums
- name: Upload sha256sums to GCP
uses: google-github-actions/upload-cloud-storage@v2
with:
path: sha256sum.yaml
destination: ${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/
- name: Copy sha256sum
shell: bash
run: |
mkdir sha256sum
cp sha256sum.yaml sha256sum
- name: Upload sha256sums to R2
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_SECRET_ACCESS_KEY }}
SOURCE_DIR: sha256sum
DEST_DIR: '${{ github.ref_name }}'
AWS_S3_ENDPOINT: https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
- name: Create Release
uses: softprops/action-gh-release@v2
id: create_release
Expand Down

0 comments on commit 030ee7e

Please sign in to comment.