Skip to content

Commit

Permalink
publish packages to GAR
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Oct 28, 2024
1 parent 1414e82 commit ec65fed
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
venv/bin/license-check
build-and-release:
permissions:
contents: read
id-token: write
if: ${{ github.ref == 'refs/heads/main' }}
needs: test
runs-on: ubuntu-latest
Expand All @@ -72,6 +75,13 @@ jobs:
run: sed 's/dynamic = \["version"]/# dynamic = ["version"]\nversion = "'"$RELEASE_TAG"'"/' -i pyproject.toml
- name: Build wheel
run: venv/bin/python -m build
- uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ vars.GCPV2_GITHUB_WORKLOAD_IDENTITY_PROVIDER }}
service_account: artifact-writer@${{ secrets.GCP_PROJECT_ID }}.iam.gserviceaccount.com
- name: Publish package
run:
venv/bin/twine upload --verbose --repository-url https://us-python.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/cavendish-prod-python/ dist/*.whl
- name: Publish release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
click==8.1.7
google-cloud-pubsub==2.23.0
google-cloud-storage==2.18.2
keyrings.google-artifactregistry-auth
pip-tools==7.4.1
pytest==8.3.2
requests==2.32.3
ruff==0.5.7
sentry-sdk==2.12.0
twine==5.1.1
Loading

0 comments on commit ec65fed

Please sign in to comment.