Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ jobs:
name: pypi
url: https://pypi.org/p/tpu-info
permissions:
contents: read
id-token: write

steps:
Expand All @@ -147,5 +148,29 @@ jobs:
name: tpu-info-dist
path: dist/

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
workload_identity_provider: 'projects/305452601764/locations/global/workloadIdentityPools/builders/providers/github'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
- name: Stage distributions and trigger OSS Exit Gate release
env:
RUN_ID: ${{ github.run_id }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
python3 -m venv .exit-gate-venv
.exit-gate-venv/bin/python -m pip install --upgrade pip twine keyrings.google-artifactregistry-auth
.exit-gate-venv/bin/python -m twine upload \
--repository-url https://us-python.pkg.dev/oss-exit-gate-prod/tpu-info--pypi/ \
--non-interactive \
--skip-existing \
dist/*
cat <<EOF > manifest.json
{
"publish_all": true
}
EOF
gcloud storage cp manifest.json \
"gs://oss-exit-gate-prod-projects-bucket/tpu-info/pypi/manifests/manifest-${RUN_ID}-${RUN_ATTEMPT}.json"
Loading