Skip to content
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2

workflows:
version: 2
build:
docs-build:
jobs:
- docs-build
- docs-build-deploy:
Expand Down
84 changes: 84 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build & Publish Wheels + Source

on:
release:
types: [published]

permissions:
contents: read

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python 3.13
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: "3.13"
cache: "pip"

- name: Install uv
uses: install-pinned/uv@b9511b633710c8bbe8ba48376771dba624746799 # 0.4.12

- name: Install dependencies
run: |
uv pip install --system -r requirements-dev.txt
uv pip install --system -e .[all]

- name: Check setup.py
run: |
python setup.py check

- name: Build src dist
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
python -m build --sdist --outdir wheels parsons

- name: Build wheels
run: git pull && python -m cibuildwheel parsons/ --output-dir wheels

# Save wheels as artifacts
- name: Upload built wheels
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
name: wheels-${{ matrix.os }}
path: wheels

publish_wheels:
if: github.repository_owner == 'move-coop'
needs: build_wheels

runs-on: ubuntu-latest
environment: release

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Download wheels
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
with:
pattern: wheels-*
path: wheels
merge-multiple: true

# Publish
- name: Publish
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
verify-metadata: true
skip-existing: true
packages-dir: wheels
verbose: true
13 changes: 9 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ requests-mock==1.12.1
ruff==0.11.7
testfixtures==8.3.0

# Build and publish requirements
cibuildwheel==2.23.0
twine==6.1.0
wheel==0.45.1

# Docs Requirements
Sphinx==8.1.3;python_version>='3.10'
Sphinx==7.4.7;python_version<'3.10'
sphinx-rtd-theme==3.0.2
myst-parser==4.0.1;python_version>='3.10'
myst-parser==3.0.1;python_version<'3.10'
myst-parser==4.0.1;python_version>='3.10'
sphinx-multiversion
sphinx-rtd-theme==3.0.2
sphinxcontrib-googleanalytics
Sphinx==7.4.7;python_version<'3.10'
Sphinx==8.1.3;python_version>='3.10'
Loading