Skip to content

made name overlap more strict. maybe this makes external solvers easier? #29

made name overlap more strict. maybe this makes external solvers easier?

made name overlap more strict. maybe this makes external solvers easier? #29

Workflow file for this run

name: Publish Python 🐍 distribution πŸ“¦ to PyPI and TestPyPI
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
on: push
jobs:
build:
name: Build distribution πŸ“¦
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: uv build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/knuckledragger
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution πŸ“¦ to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
# publish-to-testpypi:
# name: Publish Python 🐍 distribution πŸ“¦ to TestPyPI
# needs:
# - build
# runs-on: ubuntu-latest
# environment:
# name: testpypi
# url: https://test.pypi.org/p/knuckledragger
# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution πŸ“¦ to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/