Skip to content

Commit 327408b

Browse files
kyleawayanclaude
andauthored
feat: add Release Please + PyPI publishing workflow (#17)
* copy publish.yml from protdata repo * ci: add release-please workflow and remove standalone publish workflow Combines release automation (Release Please) with PyPI publishing (OIDC trusted publishing) into a single workflow. Merging a release PR now automatically builds and publishes to PyPI. Co-Authored-By: Claude Opus 4.6 <[email protected]> * add our pr title conventional-commits checker * release as 0.0.3 --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
1 parent bd215f7 commit 327408b

File tree

4 files changed

+92
-0
lines changed

4 files changed

+92
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Validates PR title follows conventional commits
2+
name: conventional-commits
3+
on:
4+
pull_request:
5+
branches: main
6+
types:
7+
- edited
8+
- opened
9+
- synchronize
10+
- reopened
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
jobs:
16+
conventional_commit_title:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: chanzuckerberg/github-actions/.github/actions/conventional-commits@v6
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release-please
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_created: ${{ steps.release.outputs.release_created }}
17+
steps:
18+
- uses: googleapis/release-please-action@v4
19+
id: release
20+
21+
release-build:
22+
runs-on: ubuntu-latest
23+
needs: release-please
24+
if: ${{ needs.release-please.outputs.release_created }}
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: "3.x"
31+
32+
- name: Build release distributions
33+
run: |
34+
python -m pip install build
35+
python -m build
36+
37+
- name: Upload distributions
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: release-dists
41+
path: dist/
42+
43+
pypi-publish:
44+
runs-on: ubuntu-latest
45+
needs: release-build
46+
permissions:
47+
id-token: write
48+
environment:
49+
name: pypi
50+
steps:
51+
- name: Retrieve release distributions
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: release-dists
55+
path: dist/
56+
57+
- name: Publish release distributions to PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
packages-dir: dist/

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.0"
3+
}

release-please-config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"last-release-sha": "0e5c9229670117c9ae95bd5888c54ff71c4d7ae7",
3+
"packages": {
4+
".": {
5+
"release-type": "simple",
6+
"bump-minor-pre-major": true,
7+
"release-as": "0.0.3"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)