Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Publish to PyPI
name: Publish to PyPI (manual tag)

# Fallback for manual tag pushes. Primary publish path is in
# release-please.yml which chains a publish job after creating a
# GitHub Release (avoids GITHUB_TOKEN tag-trigger limitation).
on:
push:
tags:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,46 @@ jobs:
release-please:
name: Release Please
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

publish:
name: Publish to PyPI
needs: release-please
if: ${{ needs.release-please.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/dataforge-py/
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v6
with:
ref: ${{ needs.release-please.outputs.tag_name }}

- uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"

- name: Build package
run: uv build

- name: Upload distribution artifacts
uses: actions/upload-artifact@v7
with:
name: release-dist
path: dist/
retention-days: 30

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ coverage.xml
.dmypy.json

# Benchmark / profiling output
benchmark_*.json
*benchmark*.json
*.prof
*.pstats

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.0"
".": "0.2.0"
}
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -884,20 +884,18 @@ DataForge uses GitHub Actions for continuous integration and delivery:
| **CI** | Push/PR to main | Commitlint + Ruff lint/format + pytest matrix (Python 3.12, 3.13) |
| **Integrations** | Push/PR to main | Tests with optional deps (PyArrow, Polars, Pydantic, SQLAlchemy) |
| **Benchmarks** | Push to main | Runs `benchmark.py --compare`, uploads results as artifact |
| **Release** | Push to main | release-please creates/updates Release PR, auto-bumps version |
| **Publish** | `v*.*.*` tag | Builds with `uv build`, publishes to PyPI via OIDC trusted publishing |
| **Release** | Push to main | release-please creates/updates Release PR; on merge, publishes to PyPI |

### Release process

1. All commits to `main` use [Conventional Commits](https://www.conventionalcommits.org/) format
2. `release-please` automatically maintains a living Release PR that bundles changes
3. Merging the Release PR creates a version tag (`v0.2.0`, etc.)
4. The tag triggers the publish workflow, which pushes to PyPI with OIDC (no token needed)
3. Merging the Release PR creates a bare numeric version tag (`0.3.0`, etc.) and a GitHub Release
4. The publish job within the same workflow builds and pushes to PyPI via OIDC trusted publishing

### Setup requirements

- **`RELEASE_TOKEN`** — GitHub PAT with `contents: write` permission (for release-please to push tags that trigger downstream workflows)
- **`pypi` environment** — GitHub Environment with manual approval gate for PyPI publishing
- **`pypi` environment** — GitHub Environment configured for PyPI OIDC trusted publishing

## Contributing

Expand Down
777 changes: 0 additions & 777 deletions phase4_benchmark.json

This file was deleted.

777 changes: 0 additions & 777 deletions phase5_benchmark.json

This file was deleted.

21 changes: 13 additions & 8 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "python",
"include-v-in-tag": false,
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"extra-files": [
"src/dataforge/__init__.py"
]
"packages": {
".": {
"release-type": "python",
"include-v-in-tag": false,
"include-component-in-tag": false,
"changelog-path": "CHANGELOG.md",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": false,
"extra-files": [
"src/dataforge/__init__.py"
]
}
}
}
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.