Skip to content

Update version

Update version #35

Workflow file for this run

name: Build and publish wheels and create a release on tag creation
on:
push:
tags:
- '*'
jobs:
source-distribution:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: python setup.py sdist
- uses: actions/upload-artifact@v4
with:
name: source-distribution
path: ${{ github.workspace }}/dist/*.tar.gz
if-no-files-found: error
overwrite: true
compression-level: 0
build-wheels:
name: ${{ matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}
runs-on: ${{ matrix.os == 'linux' && 'ubuntu' || matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' }}-${{ matrix.os == 'macos-x86_64' && '13' || matrix.os == 'macos-x86_64' && '14' || 'latest' }}
strategy:
fail-fast: false
matrix:
os: [linux, windows, macos-x86_64, macos-arm64]
arch: [x86_64]
env:
plat: ${{ matrix.os == 'windows' && 'win' || matrix.os == 'macos-x86_64' && 'macosx' || matrix.os == 'macos-arm64' && 'macosx' || 'manylinux' }}
arch: ${{ matrix.os == 'windows' && matrix.arch == 'x86_64' && 'amd64' || matrix.arch || matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Boost
if: startsWith(matrix.os, 'macos') == true
run: brew install boost
- name: CI Buildwheel
if: endsWith(github.ref, 'test') != true
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: "*-${{ env.plat }}_${{ env.arch }}"
with:
output-dir: ${{ github.workspace }}
- name: CI Buildwheel Test
if: endsWith(github.ref, 'test')
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: "{cp37,cp312}-${{ env.plat }}_${{ env.arch }}"
with:
output-dir: ${{ github.workspace }}
- name: List Artifacts
if: matrix.os != 'windows'
run: ls -la --color=always ${{ github.workspace }}/*.whl
- name: List Artifacts Windows
if: matrix.os == 'windows'
run: dir ${{ github.workspace }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}-wheels
path: ${{ github.workspace }}/*.whl
if-no-files-found: error
overwrite: true
compression-level: 0
test-packages:
if: endsWith(github.ref, 'test') != true
name: Test ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.pyver }}
runs-on: ${{ matrix.os == 'linux' && 'ubuntu' || matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-x86_64' && '13' || matrix.os == 'macos-arm64' && '14' || 'latest' }}
needs: build-wheels
strategy:
fail-fast: false
matrix:
os: [linux, windows, macos-x86_64, macos-arm64]
arch: [x86_64]
pyver: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
env:
plat: ${{ matrix.os == 'windows' && 'win' || matrix.os == 'macos-x86_64' && 'macosx' || matrix.os == 'macos-arm64' && 'macosx' || 'manylinux' }}
abi: ${{ matrix.pyver == '3.12' && 'cp312-cp312' || matrix.pyver == '3.11' && 'cp311-cp311' || matrix.pyver == '3.10' && 'cp310-cp310' || matrix.pyver == '3.9' && 'cp39-cp39' || matrix.pyver == '3.8' && 'cp38-cp38' || matrix.pyver == '3.7' && 'cp37-cp37m' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
- uses: actions/download-artifact@v4
with:
merge-multiple: true
name: ${{ matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}-wheels
- name: List Artifacts Windows
if: matrix.os == 'windows'
run: dir ${{ github.workspace }}
- name: List Artifacts
if: matrix.os != 'windows'
run: ls -la --color=always *.whl
- name: Install Wheel Windows
if: matrix.os == 'windows'
run: pip install (Get-ChildItem -Filter "*-${{ env.abi }}-${{ env.plat }}*.whl").FullName
- name: Install Wheel
if: matrix.os != 'windows'
run: |
wheel_names=("*-${{ env.abi }}-${{ env.plat }}*.whl")
pip install $wheel_names
- run: python test.py
test-packages-test:
if: endsWith(github.ref, 'test')
name: Test Test ${{ matrix.os == 'macos-86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}-${{ matrix.pyver }}
runs-on: ${{ matrix.os == 'linux' && 'ubuntu' || matrix.os == 'macos-x86_64' && 'macos' || matrix.os == 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-x86_64' && '13' || matrix.os == 'macos-arm64' && '14' || 'latest' }}
needs: build-wheels
strategy:
fail-fast: false
matrix:
os: [linux, windows, macos-x86_64, macos-arm64]
arch: [x86_64]
pyver: ['3.7', '3.12']
env:
plat: ${{ matrix.os == 'windows' && 'win' || matrix.os == 'macos-x86_64' && 'macosx' || matrix.os == 'macos-arm64' && 'macosx' || 'manylinux' }}
abi: ${{ matrix.pyver == '3.12' && 'cp312-cp312' || matrix.pyver == '3.11' && 'cp311-cp311' || matrix.pyver == '3.10' && 'cp310-cp310' || matrix.pyver == '3.9' && 'cp39-cp39' || matrix.pyver == '3.8' && 'cp38-cp38' || matrix.pyver == '3.7' && 'cp37-cp37m' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.pyver }}
- uses: actions/download-artifact@v4
with:
merge-multiple: true
name: ${{ matrix.os == 'macos-x86_64' && 'macos' || matrix.os = 'macos-arm64' && 'macos' || matrix.os }}-${{ matrix.os == 'macos-arm64' && 'arm64' || matrix.arch }}-wheels

Check failure on line 135 in .github/workflows/tag.yml

View workflow run for this annotation

GitHub Actions / Build and publish wheels and create a release on tag creation

Invalid workflow file

The workflow is not valid. .github/workflows/tag.yml (Line: 135, Col: 17): Unexpected symbol: '='. Located at position 53 within expression: matrix.os == 'macos-x86_64' && 'macos' || matrix.os = 'macos-arm64' && 'macos' || matrix.os
- name: List Artifacts Windows
if: matrix.os == 'windows'
run: dir ${{ github.workspace }}
- name: List Artifacts
if: matrix.os != 'windows'
run: ls -la --color=always *.whl
- name: Install Wheel Windows
if: matrix.os == 'windows'
run: pip install (Get-ChildItem -Filter "*-${{ env.abi }}-${{ env.plat }}*.whl").FullName
- name: Install Wheel
if: matrix.os != 'windows'
run: |
wheel_names=("*-${{ env.abi }}-${{ env.plat }}*.whl")
pip install $wheel_names
- run: python test.py
publish-to-test-pypi:
if: endsWith(github.ref, 'test')
runs-on: ubuntu-latest
needs: [test-packages-test, source-distribution]
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install twine
- name: List All Artifacts
run: ls -la --color=always
- name: Upload to test.pypi.org
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: python -m twine upload --repository-url https://test.pypi.org/legacy/ *
publish-to-pypi:
if: endsWith(github.ref, 'test') != true
runs-on: ubuntu-latest
needs: [test-packages, source-distribution]
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install twine
- name: List all Artifacts
run: ls -la --color=always
- name: Upload to pypi.org
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: python -m twine upload *
create-release-test:
runs-on: ubuntu-latest
needs: [publish-to-test-pypi]
steps:
- uses: ncipollo/release-action@v1
with:
body: |
Test Release generated by Github Actions
generateReleaseNotes: true
makeLatest: false
draft: true
prerelease: true
create-release:
runs-on: ubuntu-latest
needs: [publish-to-pypi]
steps:
- uses: ncipollo/release-action@v1
with:
body: |
Automatically generated by Github Actions Run ${{ github.run_id }}
generateReleaseNotes: true
makeLatest: true