Release v0.10.8 #113
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+.post[0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+" | |
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
PACKAGE_NAME: pycrdt | |
jobs: | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
architecture: x64 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build wheels - universal2 | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --target universal2-apple-darwin --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10 | |
- name: Test built wheel - universal2 | |
run: | | |
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26" "exceptiongroup; python_version<'3.11'" | |
pip install pycrdt --no-deps --no-index --find-links dist --force-reinstall | |
pytest | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-macos | |
path: dist | |
windows: | |
runs-on: windows-latest | |
name: windows (${{ matrix.platform.target }}) | |
strategy: | |
matrix: | |
platform: | |
- target: x64 | |
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 | |
- target: x86 | |
interpreter: 3.8 3.9 3.10 3.11 3.12 3.13 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
architecture: ${{ matrix.platform.target }} | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.platform.target }} | |
args: --release --out dist -i ${{ matrix.platform.interpreter }} | |
- name: Test built wheel | |
run: | | |
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26" "exceptiongroup; python_version<'3.11'" | |
pip install pycrdt --no-deps --no-index --find-links dist --force-reinstall | |
pytest | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-windows-${{ matrix.platform.target }} | |
path: dist | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64, i686] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
architecture: x64 | |
- name: Build sdist | |
if: ${{ matrix.target == 'x86_64' }} | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10 | |
- name: Test built wheel | |
if: matrix.target == 'x86_64' | |
run: | | |
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26" "exceptiongroup; python_version<'3.11'" | |
pip install pycrdt --no-deps --no-index --find-links dist --force-reinstall | |
pytest | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.target }} | |
path: dist | |
linux-cross: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [aarch64, armv7, s390x, ppc64le] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10 | |
- uses: uraimo/[email protected] | |
name: Test built wheel | |
with: | |
arch: ${{ matrix.target }} | |
distro: ubuntu20.04 | |
githubToken: ${{ github.token }} | |
install: | | |
apt-get update | |
apt-get install -y --no-install-recommends python3 python3-pip | |
pip3 install -U pip pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26" "exceptiongroup; python_version<'3.11'" | |
run: | | |
pip3 install pycrdt --no-deps --no-index --find-links dist/ --force-reinstall | |
pytest | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-cross-${{ matrix.target }} | |
path: dist | |
pypi-release: | |
name: Publish to PyPI | |
runs-on: ubuntu-latest | |
needs: | |
- macos | |
- windows | |
- linux | |
- linux-cross | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- uses: actions/setup-python@v5 | |
- name: Publish to PyPI | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
pip install --upgrade twine | |
twine upload --skip-existing dist/* | |
github-release: | |
name: Create GitHub release | |
needs: pypi-release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- id: changelog | |
uses: agronholm/release-notes@v1 | |
with: | |
path: CHANGELOG.md | |
version_pattern: ^\#\# ([0-9][^*]*)\n | |
- uses: ncipollo/release-action@v1 | |
with: | |
body: ${{ steps.changelog.outputs.changelog }} |