Skip to content
Merged
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
18 changes: 15 additions & 3 deletions .github/workflows/private-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,28 @@ jobs:
fi

- name: Build and publish Python wheels
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
set -euo pipefail
python -m pip install --quiet build twine keyrings.google-artifactregistry-auth
mkdir -p dist/python-wheels
for directory in dist/packages/python/*; do
python -m build --wheel --outdir "$GITHUB_WORKSPACE/dist/python-wheels" "$directory"
done
twine upload --skip-existing \
--repository-url "https://${{ vars.AR_LOCATION }}-python.pkg.dev/${{ vars.AR_PROJECT }}/${{ vars.AR_PYTHON_REPO }}/" \
dist/python-wheels/*
existing="$(gcloud artifacts files list \
--project="${{ vars.AR_PROJECT }}" --location="${{ vars.AR_LOCATION }}" \
--repository="${{ vars.AR_PYTHON_REPO }}" --package=yieldskill --version="$VERSION" \
--format='value(name)' 2>/dev/null || true)"
for wheel in dist/python-wheels/*; do
filename="$(basename "$wheel")"
if ! grep -Fq "$filename" <<<"$existing"; then
twine upload \
--repository-url "https://${{ vars.AR_LOCATION }}-python.pkg.dev/${{ vars.AR_PROJECT }}/${{ vars.AR_PYTHON_REPO }}/" \
"$wheel"
existing="${existing}"$'\n'"${filename}"
fi
done

- name: Publish Rust runtime crates
env:
Expand Down
Loading