Skip to content

Build pydantic-core 2.25.1 by @benbrandt #50

Build pydantic-core 2.25.1 by @benbrandt

Build pydantic-core 2.25.1 by @benbrandt #50

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
inputs:
project:
required: true
description: "PyPI project to build"
type: choice
options:
- pydantic-core
version:
required: true
description: "Project Version"
python_3_12:
required: false
type: boolean
default: true
description: "Build for Python 3.12"
python_3_13:
required: false
type: boolean
default: true
description: "Build for Python 3.13"
publish:
required: true
default: false
type: boolean
description: "Publish the output to a GitHub release"
run-name: Build ${{ inputs.project }} ${{ inputs.version }} by @${{ github.actor }}
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
with:
toolchain: stable
targets: wasm32-wasip1
- uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3
- uses: actions/setup-python@v5
with:
python-version: |
3.12
3.13
- uses: actions/cache@v4
with:
path: cpython-3.12.8
key: cpython-wasi-3.12.8-wasi-sdk-25.0.0
- uses: actions/cache@v4
with:
path: cpython-3.13.1
key: cpython-wasi-3.13.1-wasi-sdk-25.0.0
- uses: actions/cache@v4
with:
path: wasi-sdk
key: wasi-sdk-25.0.0
- run: cargo run -- install-build-tools
- run: cargo run -- build ${{ inputs.project }} ${{ inputs.version }} ${{ inputs.python_3_12 && '--python-versions py3-12' || '' }} ${{ inputs.python_3_13 && '--python-versions py3-13' || '' }} ${{ inputs.publish && format('--publish --repo {0} --run-id {1}', github.repository, github.run_id) || '' }}
env:
GH_TOKEN: ${{ github.token }}