Skip to content

chore(release): 0.3.0 (#86) #17

chore(release): 0.3.0 (#86)

chore(release): 0.3.0 (#86) #17

Workflow file for this run

# This workflow triggers the CI, updates the version, and uploads the release to GitHub and Google Cloud Storage when a push is made to either the 'main' or 'develop' branch.
#
# Workflow Steps:
#
# 1. Ci is triggered using the CI workflow defined in .github/workflows/ci.yaml
# 2. If it succeeds, the version is updated using Python Semantic Release
# 3. The release is uploaded to GitHub (same step and GitHub action)
# 5. Authentication to Google Cloud is achieved using Workload Identity Federation
# 6. The release is uploaded to Google Artifact Registry
#
# For more details on setting up Workload Identity Federation for GitHub, visit https://github.com/google-github-actions/auth#setting-up-workload-identity-federation
# WIF service account must have roles/artifactregistry.write access to the Artifact Registry repository
name: CI and Release on main
on:
push:
branches:
- main
jobs:
CI:
uses: ./.github/workflows/ci.yaml
Release:
runs-on: ubuntu-latest
concurrency: Release
needs: CI
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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'
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
run: pip install twine keyrings.google-artifactregistry-auth
- name: Upload dist to Google Artifact Registry
run: |
python3 -m twine upload \
--repository-url https://europe-west1-python.pkg.dev/vertex-deployer-sandbox-3a8a/vertex-deployer \
--verbose \
dist/*