Skip to content

Commit ac43ad0

Browse files
committed
build: add release-please, fix gitignore, drop TestPyPI
- Add release-please workflow + config + manifest (initial version 0.3.0) - release.yml: remove TestPyPI job, publish all tags directly to PyPI - coordinode/pyproject.toml: fix version-file path (_version.py, not coordinode/_version.py) - .gitignore: cover entire _proto/ dir and fix _version.py paths for subdirs
1 parent 7ae969a commit ac43ad0

6 files changed

Lines changed: 50 additions & 34 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
release_created: ${{ steps.rp.outputs.release_created }}
17+
tag_name: ${{ steps.rp.outputs.tag_name }}
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
id: rp
21+
with:
22+
config-file: release-please-config.json
23+
manifest-file: .release-please-manifest.json

.github/workflows/release.yml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Release
22

3-
# Triggered manually: create a tag v0.3.0 → GitHub Release → this workflow publishes to PyPI.
4-
# Tag format: v{MAJOR}.{MINOR}.{PATCH} → stable, publishes to PyPI
5-
# v{MAJOR}.{MINOR}.{PATCH}a{N} → pre-release, publishes to TestPyPI only
3+
# Triggered automatically by release-please (see release-please.yml):
4+
# 1. Merge release PR → release-please tags the commit → this workflow publishes to PyPI.
5+
# Tag format: v{MAJOR}.{MINOR}.{PATCH} → stable release
6+
# v{MAJOR}.{MINOR}.{PATCH}a{N} → pre-release (published to PyPI with --pre required)
67

78
on:
89
push:
@@ -53,36 +54,10 @@ jobs:
5354
path: ${{ matrix.package.path }}/dist/
5455
retention-days: 1
5556

56-
publish-testpypi:
57-
name: Publish to TestPyPI (pre-release)
58-
runs-on: ubuntu-latest
59-
needs: build
60-
if: contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc')
61-
environment: testpypi
62-
permissions:
63-
id-token: write
64-
strategy:
65-
matrix:
66-
package:
67-
- coordinode
68-
- langchain-coordinode
69-
- llama-index-graph-stores-coordinode
70-
steps:
71-
- uses: actions/download-artifact@v4
72-
with:
73-
name: dist-${{ matrix.package }}
74-
path: dist/
75-
76-
- uses: pypa/gh-action-pypi-publish@release/v1
77-
with:
78-
repository-url: https://test.pypi.org/legacy/
79-
packages-dir: dist/
80-
8157
publish-pypi:
82-
name: Publish to PyPI (stable)
58+
name: Publish to PyPI
8359
runs-on: ubuntu-latest
8460
needs: build
85-
if: "!contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name, 'rc')"
8661
environment: pypi
8762
permissions:
8863
id-token: write
@@ -120,3 +95,4 @@ jobs:
12095
prerelease: ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
12196
generate_release_notes: true
12297
files: dist/*
98+

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated proto stubs — run `make proto` to regenerate
2-
coordinode/_proto/coordinode/
2+
coordinode/_proto/
33

44
# Build artifacts
55
dist/
@@ -18,6 +18,6 @@ env/
1818

1919
# Version files generated by hatch-vcs
2020
coordinode/_version.py
21-
langchain_coordinode/_version.py
22-
llama_index/graph_stores/coordinode/_version.py
21+
langchain-coordinode/langchain_coordinode/_version.py
22+
llama-index-coordinode/llama_index/graph_stores/coordinode/_version.py
2323
GAPS.md

.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.3.0"
3+
}

coordinode/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fallback-version = "0.0.0"
4747
raw-options = {root = ".."}
4848

4949
[tool.hatch.build.hooks.vcs]
50-
version-file = "coordinode/_version.py"
50+
version-file = "_version.py"
5151

5252
[tool.hatch.build.targets.wheel]
5353
packages = ["coordinode"]

release-please-config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "python",
4+
"tag-separator": "",
5+
"include-component-in-tag": false,
6+
"packages": {
7+
".": {
8+
"component": "sdk",
9+
"changelog-path": "CHANGELOG.md"
10+
}
11+
},
12+
"versioning": "semver",
13+
"initial-version": "0.3.0"
14+
}

0 commit comments

Comments
 (0)