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
28 changes: 28 additions & 0 deletions .github/workflows/release-prime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,35 @@
type: string

jobs:
await-sandboxes-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# The CLI image installs the wheel with its dependencies resolved from PyPI, and
# release-sandboxes.yml runs independently of this workflow. Tagging or publishing
# before prime-sandboxes is installable would strand the release: the CLI tag
# already exists, so a rerun skips it, and every image build fails.
- name: Wait for the required prime-sandboxes version on PyPI
run: |
FLOOR=$(sed -nE 's/.*"prime-sandboxes>=([^"]+)".*/\1/p' packages/prime/pyproject.toml | head -n1)
if [ -z "$FLOOR" ]; then
echo "::error::Unable to parse the prime-sandboxes floor from packages/prime/pyproject.toml"
exit 1
fi
echo "Waiting for prime-sandboxes==$FLOOR to become installable"
for _ in $(seq 1 40); do
if python3 -m pip download --quiet --no-deps --no-cache-dir --dest /tmp/floor-check "prime-sandboxes==$FLOOR"; then
echo "prime-sandboxes $FLOOR is installable"
exit 0
fi
sleep 15
done
echo "::error::prime-sandboxes $FLOOR is still not on PyPI after 10 minutes; check the Release prime-sandboxes workflow"
exit 1

tag-and-release:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
needs: await-sandboxes-release
runs-on: ubuntu-latest
environment: pypi-prod
permissions:
Expand Down
Loading