Merge pull request #96 from manicmaniac/release/0.5.0 #12
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: Release | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
workflow_dispatch: | |
inputs: | |
dry-run: | |
type: boolean | |
description: Do not deploy to PyPI | |
default: true | |
jobs: | |
build-sdist: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- run: python setup.py sdist --verbose | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: arc4-sdist | |
path: dist/arc4-*.tar.gz | |
build-wheels: | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macOS-12 | |
- windows-2019 | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
- '3.13' | |
- 'pypy-3.9' | |
- 'pypy-3.10' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- run: pip install wheel | |
- run: python setup.py bdist_wheel | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: arc4-wheels-${{ matrix.os }}-${{ matrix.python-version }} | |
path: dist/*whl | |
build-manylinux-wheels: | |
runs-on: ubuntu-24.04 | |
container: | |
image: quay.io/pypa/manylinux_2_28_x86_64 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- cp37-cp37m | |
- cp38-cp38 | |
- cp39-cp39 | |
- cp310-cp310 | |
- cp311-cp311 | |
- pp37-pypy37_pp73 | |
- pp38-pypy38_pp73 | |
- pp39-pypy39_pp73 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: /opt/python/${{ matrix.python-version }}/bin/pip wheel . | |
- run: auditwheel repair arc4-*-linux*.whl --plat manylinux_2_28_x86_64 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: arc4-wheels-manylinux-${{ matrix.python-version }} | |
path: wheelhouse/arc4-*-manylinux*.whl | |
deploy: | |
if: ${{ github.event_name == 'push' || github.event.inputs.dry-run != 'true' }} | |
needs: | |
- build-sdist | |
- build-wheels | |
- build-manylinux-wheels | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
- run: pip install twine | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: arc4-* | |
merge-multiple: true | |
path: artifact | |
- run: twine upload --verbose artifact/* | |
env: | |
TWINE_NON_INTERACTIVE: 1 | |
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/ | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} |