Add support for Python 3.12 (#13) #16
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: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
release_manylinux: | |
name: Release manylinux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-path: ['cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312'] | |
container: quay.io/pypa/manylinux_2_28_x86_64:latest | |
env: | |
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | |
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: x86_64-unknown-linux-gnu | |
- run: yum makecache && yum -y install libffi-devel openssl-devel | |
- run: /opt/python/${{ matrix.python-path }}/bin/python -m venv .venv | |
- run: .venv/bin/pip install -U pip wheel | |
- run: .venv/bin/pip install -U twine maturin | |
- run: .venv/bin/pip install -r requirements.txt | |
- run: OPENSSL_STATIC=1 .venv/bin/maturin build --release --strip --manylinux 2_28 -i /opt/python/${{ matrix.python-path }}/bin/python --target x86_64-unknown-linux-gnu | |
- run: .venv/bin/pip install rfernet --no-index -f target/wheels | |
- run: .venv/bin/pytest | |
- run: .venv/bin/twine upload --non-interactive --skip-existing target/wheels/* | |
release_macos: | |
name: Release macOS | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
target-arch: ['x86_64-apple-darwin'] | |
runs-on: macos-latest | |
env: | |
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | |
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
target: ${{ matrix.target-arch }} | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install -U pip wheel twine maturin | |
- run: pip install -r requirements.txt | |
- run: maturin build --release --strip --manylinux off -i $pythonLocation/python --target ${{ matrix.target-arch }} | |
- run: pip install rfernet --no-index -f target/wheels | |
- run: pytest | |
- run: twine upload --non-interactive --skip-existing target/wheels/* | |
release_sdist: | |
name: Release sdist | |
runs-on: ubuntu-latest | |
env: | |
TWINE_PASSWORD: ${{secrets.TWINE_PASSWORD}} | |
TWINE_USERNAME: ${{secrets.TWINE_USERNAME}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- run: pip install -U pip wheel twine maturin | |
- run: pip install -r requirements.txt | |
- run: maturin sdist | |
- run: twine upload --non-interactive --skip-existing target/wheels/* |