Skip to content

Commit e55631a

Browse files
authored
Update release_flow.yml
1 parent 32877e8 commit e55631a

1 file changed

Lines changed: 16 additions & 10 deletions

File tree

.github/workflows/release_flow.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,20 @@ jobs:
112112
publish_release:
113113
name: Publish release
114114
needs: buildassets
115-
# Authenticate with gcloud using OIDC
116-
- name: Authenticate with GCP using OIDC
117-
run: |
118-
echo "${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}" > gcp-service-account.json
119-
gcloud auth activate-service-account --key-file=gcp-service-account.json
120-
gcloud auth login --update-adc
115+
runs-on: ubuntu-latest
116+
permissions:
117+
contents: 'read'
118+
id-token: 'write'
119+
steps:
120+
- id: 'auth'
121+
name: 'Authenticate to Google Cloud'
122+
uses: 'google-github-actions/auth@v1.0.0'
123+
with:
124+
create_credentials_file: 'true'
125+
workload_identity_provider: ${{ secrets.CODECOV_GCP_WIDP }}
126+
service_account: ${{ secrets.CODECOV_GCP_WIDSA }}
121127

122-
# Publish the release tag to a Pub/Sub topic
123-
- name: Publish a message to a Pub/Sub topic
124-
run: |
125-
gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}'
128+
# Publish the release tag to a Pub/Sub topic
129+
- name: Publish a message to a Pub/Sub topic
130+
run: |
131+
gcloud pubsub topics publish ${{ secrets.GCLOUD_UPLOADER_PUBSUB_TOPIC }} --message '{"release":"'"${{ github.ref_name }}"'", "latest":true}'

0 commit comments

Comments
 (0)