Bumped up the version #40
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 packages to PyPI | |
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]+" | |
jobs: | |
binary-wheels: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
environment: release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CBOR2_BUILD_C_EXTENSION: "1" | |
CIBW_SKIP: pp* cp36* cp37* | |
CIBW_ARCHS: auto64 | |
CIBW_ARCHS_MACOS: x86_64 arm64 | |
CIBW_ARCHS_LINUX: x86_64 aarch64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.os }} | |
path: wheelhouse/*.whl | |
sdist-purewheel: | |
runs-on: ubuntu-latest | |
environment: release | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: pip install build | |
- name: Create sdist and pure-Python wheel | |
run: python -m build . | |
env: | |
CBOR2_BUILD_C_EXTENSION: "0" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sdist | |
path: dist/* | |
publish: | |
needs: | |
- binary-wheels | |
- sdist-purewheel | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
steps: | |
- name: Download generated packaging artifacts | |
uses: actions/download-artifact@v4 | |
- name: Move the packages to dist/ | |
run: | | |
mkdir dist | |
mv */*.whl */*.tar.gz dist | |
- name: Upload packages | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
release: | |
name: Create a GitHub release | |
needs: | |
- binary-wheels | |
- sdist-purewheel | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- id: changelog | |
uses: agronholm/release-notes@v1 | |
with: | |
path: docs/versionhistory.rst | |
- uses: ncipollo/release-action@v1 | |
with: | |
body: ${{ steps.changelog.outputs.changelog }} |