Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Upload go-sm release builds to R2 #6225

Closed
wants to merge 5 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 39 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,26 @@ 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
run: >
aws s3 sync build-zip
s3://${{ secrets.CLOUDFLARE_GO_SM_BUILDS_BUCKET }}/${{ github.ref_name }}
--endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
--acl public-read --follow-symlinks --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
- name: Install coreutils
if: ${{ matrix.os == 'macos-13' || matrix.os == '[self-hosted, macOS, ARM64, go-spacemesh]' }}
run: brew install coreutils
Expand Down Expand Up @@ -138,16 +153,31 @@ jobs:
- name: Setup gcloud authentication
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
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
run: >
aws s3 sync sha256sum
s3://${{ secrets.CLOUDFLARE_GO_SM_BUILDS_BUCKET }}/${{ github.ref_name }}
--endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com
--acl public-read --follow-symlinks --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_GO_SM_BUILDS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
- name: Create Release
uses: softprops/action-gh-release@v2
id: create_release
Expand All @@ -157,14 +187,14 @@ jobs:
tag_name: ${{ github.ref_name }}
body: |
## Zip Files
- Windows amd64: https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/${{ env.OUTNAME_WIN_AMD64 }}.zip
- macOS amd64: https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/${{ env.OUTNAME_MAC_AMD64 }}.zip
- macOS arm64: https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/${{ env.OUTNAME_MAC_ARM64 }}.zip
- Linux amd64: https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/${{ env.OUTNAME_LINUX_AMD64 }}.zip
- Linux arm64: https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/${{ env.OUTNAME_LINUX_ARM64 }}.zip
- Windows amd64: https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/${{ env.OUTNAME_WIN_AMD64 }}.zip
- macOS amd64: https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/${{ env.OUTNAME_MAC_AMD64 }}.zip
- macOS arm64: https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/${{ env.OUTNAME_MAC_ARM64 }}.zip
- Linux amd64: https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/${{ env.OUTNAME_LINUX_AMD64 }}.zip
- Linux arm64: https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/${{ env.OUTNAME_LINUX_ARM64 }}.zip

## checksum - Zip files
YAML with all the checksums of this version : https://storage.googleapis.com/${{ secrets.GCP_BUCKET }}/${{ github.ref_name }}/sha256sum.yaml
YAML with all the checksums of this version : https://go-spacemesh-release-builds.spacemesh.network/${{ github.ref_name }}/sha256sum.yaml
- Windows amd64 - sha256 : ${{ env.SHA256_WIN_AMD64 }}
- Linux amd64 - sha256: ${{ env.SHA256_LINUX_AMD64 }}
- Linux arm64 - sha256: ${{ env.SHA256_LINUX_ARM64 }}
Expand Down
Loading