Skip to content

feat: bump version to v0.1.21 #132

feat: bump version to v0.1.21

feat: bump version to v0.1.21 #132

Workflow file for this run

name: Build and upload to PyPI
on:
workflow_dispatch:
pull_request:
push:
tags:
- v*
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-13, macos-14]
pyver: [cp36, cp37, cp38, cp39, cp310, cp311, cp312, cp313, pp38, pp39,pp310]
exclude:
# excludes
- os: macos-14
pyver: cp36
- os: macos-14
pyver: cp37
- os: windows-latest
pyver: pp38
- os: windows-latest
pyver: pp39
- os: windows-latest
pyver: pp310
- os: windows-latest
pyver: cp36
- os: windows-latest
pyver: cp37
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.20.0
env:
# configure cibuildwheel to build native archs ('auto'), and some
# emulated ones
CIBW_ARCHS_LINUX: auto64 aarch64
CIBW_BUILD: ${{matrix.pyver}}-*
- uses: actions/upload-artifact@v4
with:
name: python-wheels-${{ matrix.os }}-${{ matrix.cibw_archs }}-${{ matrix.pyver }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: python-wheels-source
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyrpmdb
permissions:
id-token: write
# if: github.event_name == 'release' && github.event.action == 'published'
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
pattern: python-wheels*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
# To test: repository-url: https://test.pypi.org/legacy/
skip-existing: true
verbose: true
verify-metadata: true