Skip to content

Merge pull request #2035 from getsentry/craft-release-5247e7bce789f01… #4338

Merge pull request #2035 from getsentry/craft-release-5247e7bce789f01…

Merge pull request #2035 from getsentry/craft-release-5247e7bce789f01… #4338

Workflow file for this run

name: build
on:
pull_request:
push:
branches: [main]
concurrency:
# serialize runs on the default branch
group: ${{ github.event_name == 'push' && github.workflow || github.sha }}${{ github.workflow }}
jobs:
linux:
strategy:
fail-fast: false
matrix:
include:
- {arch: amd64, os: ubuntu-latest}
- {arch: arm64, os: ubuntu-24.04-arm}
runs-on: ${{ matrix.os }}
container: ghcr.io/getsentry/pypi-manylinux-${{ matrix.arch }}-ci
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- run: python3 -um build --pypi-url https://pypi.devinfra.sentry.io
- run: python3 -um validate --index-url https://pypi.devinfra.sentry.io/simple
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist-linux-${{ matrix.arch }}
path: dist/*
macos:
strategy:
matrix:
runs-on: [macos-15]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: astral-sh/setup-uv@884ad927a57e558e7a70b92f2bccf9198a4be546 # v6
- run: python3 -u docker/install-pythons --dest pythons
- run: |
echo "$PWD/pythons/cp311-cp311/bin" >> "$GITHUB_PATH"
echo "$PWD/pythons/cp312-cp312/bin" >> "$GITHUB_PATH"
echo "$PWD/pythons/cp313-cp313/bin" >> "$GITHUB_PATH"
echo "$PWD/pythons/cp314-cp314/bin" >> "$GITHUB_PATH"
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
- run: uv sync --no-dev
- run: python3 -um build --pypi-url https://pypi.devinfra.sentry.io
- run: python3 -um validate --index-url https://pypi.devinfra.sentry.io/simple
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist-${{ matrix.runs-on }}
path: dist/*
collect-and-deploy:
needs: [linux, macos]
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: astral-sh/setup-uv@884ad927a57e558e7a70b92f2bccf9198a4be546 # v6
- run: uv sync --no-dev
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
path: dist
- run: uv run python3 -um make_index --pypi-url https://pypi.devinfra.sentry.io --dest index
- uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
with:
workload_identity_provider: projects/868781662168/locations/global/workloadIdentityPools/prod-github/providers/github-oidc-pool
service_account: gha-pypi@sac-prod-sa.iam.gserviceaccount.com
- run: uv run python3 -uS bin/upload-artifacts