Skip to content

Update pyproject.toml #9

Update pyproject.toml

Update pyproject.toml #9

name: Build, test and publish nnef_tools
on:
push:
tags:
- 'nnef_tools-v[0-9]+.[0-9]+.[0-9]+'
jobs:
build_nnef_tools:
name: Build and publish nnef_tools
runs-on: "ubuntu-latest"
# permissions:
# # IMPORTANT: this permission is mandatory for trusted publishing
# id-token: write
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 pytest pytest-xdist
- name: Build package
run: python -m build ./nnef_tools-pyproject/ --outdir ./dist/
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ github.ref_name }}
path: ./dist/*
- name: Install
run: python -m pip install ./nnef-pyproject/ ./nnef_tools-pyproject[full]
- name: Test
run: python -m pytest ./nnef_tools-pyproject/tests/ -n auto
- 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/