Skip to content

Commit

Permalink
upload assets to gcs (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
enrichman authored Jul 11, 2024
1 parent cf0d6e3 commit 01a8453
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,19 @@ jobs:
secrets: |
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials username | DOCKER_USERNAME ;
secret/data/github/repo/${{ github.repository }}/dockerhub/rancher/credentials password | DOCKER_PASSWORD ;
secret/data/github/repo/${{ github.repository }}/google-auth/rancher/credentials token | GOOGLE_AUTH ;
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ env.GOOGLE_AUTH }}"

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -75,6 +81,14 @@ jobs:
find . -maxdepth 1 -type f ! -name sha256sum.txt -printf '%P\0' | xargs -0 sha256sum > sha256sum.txt
gh release upload $VERSION *.txt *.xz *.gz *.zip
- name: Upload Release assets to Google Cloud
uses: google-github-actions/upload-cloud-storage@v2
with:
path: dist/artifacts/$VERSION
destination: releases.rancher.com/cli2/$VERSION
headers: |-
cache-control: public,max-age=3600
- name: Docker Build
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit 01a8453

Please sign in to comment.