Skip to content

Commit

Permalink
fix: test release to artifact registry
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand committed Nov 6, 2023
1 parent 5cd8321 commit 8695baf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ name: CI and Release on main
on:
push:
branches:
- main
- 'main'
- 'fix/cd-push-to-artifact-registry'

jobs:
CI:
Expand All @@ -34,10 +35,10 @@ jobs:
with:
fetch-depth: 0

- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# - name: Python Semantic Release
# uses: python-semantic-release/python-semantic-release@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}

- name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
Expand All @@ -46,12 +47,21 @@ jobs:
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: Copy release to root
run: cp -r dist/*.tar.gz .
# - name: Copy release to root
# run: cp -r dist/*.tar.gz .

- name: 'Upload Release to Google Cloud Storage'
uses: 'google-github-actions/upload-cloud-storage@v1'
with:
path: '.'
destination: vertex-pipelines-deployer
glob: '*.tar.gz'
# - name: 'Upload Release to Google Cloud Storage'
# uses: 'google-github-actions/upload-cloud-storage@v1'
# with:
# path: '.'
# destination: vertex-pipelines-deployer
# glob: '*.tar.gz'

- name: Install twine
run: pip install twine

- name: Upload to Google Artifact Registry
run: |
python3 -m twine upload \
--repository-url https://europe-west1-python.pkg.dev/vertex-deployer-sandbox-3a8a/vertex-deployer \
dist/*
Binary file added dist/vertex_deployer-0.2.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/vertex_deployer-0.2.1.tar.gz
Binary file not shown.

0 comments on commit 8695baf

Please sign in to comment.