Skip to content

update for numpy version 2.0, fix some project properties #8

update for numpy version 2.0, fix some project properties

update for numpy version 2.0, fix some project properties #8

Workflow file for this run

name: Build, test and publish nnef
on:
push:
tags:
- 'nnef-v[0-9]+.[0-9]+.[0-9]+'
jobs:
build_wheels:
name: Build nnef wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-13
- macos-14
steps:
- uses: actions/checkout@v4
- name: Build wheels for nnef
uses: pypa/cibuildwheel@v2.17.0
with:
package-dir: nnef-pyproject
output-dir: dist/
config-file: nnef-pyproject/pyproject.toml
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ github.ref_name }}
path: ./dist/*.whl
build_sdist:
name: Build nnef sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build ./nnef-pyproject/ --sdist --outdir ./dist
- uses: actions/upload-artifact@v4
with:
name: dist-${{ github.ref_name }}
path: ./dist/*.tar.gz
publish:
name: Publish nnef
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
# permissions:
# # IMPORTANT: this permission is mandatory for trusted publishing
# id-token: write
steps:
- name: Download dist/
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# repository-url: https://test.pypi.org/legacy/