Skip to content

Update citation details in CITATION.cff #20

Update citation details in CITATION.cff

Update citation details in CITATION.cff #20

Workflow file for this run

name: Publish Python Package
# Triggers:
# push to main → build dev package (e.g. 0.2.1.dev5) and publish to TestPyPI
# push of v* tag → build stable package (e.g. 0.2.0) and publish to PyPI
on:
push:
branches: ["main"]
tags: ["v*"]
permissions:
contents: read
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required by setuptools_scm to find tags and compute version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build
run: python3 -m pip install build --user
- name: Build wheel and source tarball
run: python3 -m build
- name: Store distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish to TestPyPI (dev builds on main)
if: github.ref == 'refs/heads/main'
needs: [build]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/pyneon
permissions:
id-token: write # required for trusted publishing
steps:
- name: Download distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.13.0
with:
repository-url: https://test.pypi.org/legacy/
publish-to-pypi:
name: Publish to PyPI (stable releases on v* tags)
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pyneon
permissions:
id-token: write # required for trusted publishing
steps:
- name: Download distribution packages
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.13.0