- pyproject.toml: rename package eco -> eco-suite (eco was already taken on PyPI); move escape-fel + dask-jobqueue into core dependencies since eco.elements.assembly unconditionally needs them (a bare `import eco` was broken without the psi extra, verified in a clean venv); drop git-URL installs for scilog/escape-fel now that both are on public PyPI; update project URLs to the GitHub mirror and ReadTheDocs. - Add LICENSE (GPLv3, matching what pyproject.toml already declared). - Add MANIFEST.in to keep the vendored eco/elements/textual test/ subproject out of the sdist (it was already excluded from the wheel, but not the sdist, via the existing packages.find/exclude-package-data config). - Add .github/workflows/publish.yml (PyPI Trusted Publishing on v*.*.* tags) and .githooks/pre-push (auto-bump a patch tag on push to master), mirroring the escape-fel release setup.
59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
name: Publish to PyPI
|
|
|
|
# Triggered when you push a version tag, e.g.:
|
|
# git tag v0.1.0
|
|
# git push --tags
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
jobs:
|
|
# ── 1. Build source distribution and wheel ──────────────────────────────
|
|
build:
|
|
name: Build distribution
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # setuptools-scm needs full git history to find tags
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install build frontend
|
|
run: pip install build
|
|
|
|
- name: Build sdist and wheel
|
|
run: python -m build
|
|
|
|
- name: Upload built packages as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
|
|
# ── 2. Publish to PyPI via Trusted Publishing (no stored token needed) ──
|
|
publish:
|
|
name: Publish to PyPI
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
|
|
# "pypi" is the GitHub environment you create in repo Settings → Environments.
|
|
# PyPI Trusted Publishing is configured to allow this environment.
|
|
environment: pypi
|
|
permissions:
|
|
id-token: write # required for OIDC Trusted Publishing
|
|
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: dist/
|
|
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|