Skip to content

Commit

Permalink
ci: upload to gar only if release (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand authored Nov 13, 2023
1 parent dacceac commit ae402c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,19 @@ jobs:
github_token: ${{ secrets.RELEASE_ACCESS_TOKEN }}

- name: 'Authenticate to Google Cloud'
if: steps.python-semantic-release.outputs.release == true
uses: 'google-github-actions/auth@v1'
with:
token_format: 'access_token'
workload_identity_provider: '${{ secrets.WIF_PROVIDER }}' # e.g. - projects/123456789/locations/global/workloadIdentityPools/my-pool/providers/my-provider
service_account: '${{ secrets.WIF_SERVICE_ACCOUNT }}' # e.g. - [email protected]

- name: Install twine
if: steps.python-semantic-release.outputs.release == true
run: pip install twine keyrings.google-artifactregistry-auth

- name: Upload dist to Google Artifact Registry
if: steps.python-semantic-release.outputs.release == true
run: |
python3 -m twine upload \
--repository-url https://europe-west1-python.pkg.dev/data-sandbox-fr/artefactory \
Expand Down

0 comments on commit ae402c7

Please sign in to comment.