Skip to content

Commit

Permalink
ci: upload to pypi (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
julesbertrand committed Apr 8, 2024
1 parent 2cd0fab commit 7f02b42
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
permissions:
id-token: write
contents: write
environment:
name: pypi
url: https://pypi.org/p/vertex-deployer

steps:
- uses: actions/checkout@v4
Expand All @@ -48,20 +51,26 @@ jobs:
with:
github_token: ${{ secrets.RELEASE_ACCESS_TOKEN }}

# Publish to Pypi
- name: Publish package distributions to PyPI
if: steps.python-semantic-release.outputs.released == 'true'
uses: pypa/gh-action-pypi-publish@release/v1

# Publish to Google Artifact Registry
- name: 'Authenticate to Google Cloud'
if: ${{ steps.python-semantic-release.outputs.released == 'true' }}
if: steps.python-semantic-release.outputs.released == 'true'
uses: 'google-github-actions/auth@v2'
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. - my-service-account@my-project.iam.gserviceaccount.com

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

- name: Upload dist to Google Artifact Registry
if: ${{ steps.python-semantic-release.outputs.released == 'true' }}
if: steps.python-semantic-release.outputs.released == 'true'
run: |
python3 -m twine upload \
--repository-url https://europe-west1-python.pkg.dev/data-sandbox-fr/artefactory \
Expand Down
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
[tool.poetry]
name = "vertex-deployer"
version = "0.4.3"
description = ""
authors = ["julesbertrand <julesbertrand13@gmail.com>"]
description = "Check, compile, upload, run, and schedule Kubeflow Pipelines on GCP Vertex AI in a standardized manner."
authors = [
"artefactory <jules.bertrand@artefact.com>",
"julesbertrand <jules.bertrand@artefact.com>"
]
license = "Apache-2.0"
homepage = "https://github.com/artefactory/vertex-pipelines-deployer"
documentation = "https://artefactory.github.io/vertex-pipelines-deployer/"
repository = "https://github.com/artefactory/vertex-pipelines-deployer"
keywords = ["kubeflow", "vertexai", "aiplatform", "gcp", "mlops", "deployer", "pipeline"]
readme = "README.md"
packages = [{include = "deployer"}]

Expand Down

0 comments on commit 7f02b42

Please sign in to comment.