11name : 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
78on :
89 push :
@@ -26,65 +27,37 @@ jobs:
2627 - name : llama-index-graph-stores-coordinode
2728 path : llama-index-coordinode
2829 steps :
29- - uses : actions/checkout@v4
30+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
3031 with :
3132 submodules : recursive
3233 fetch-depth : 0 # hatch-vcs needs full history for tag detection
3334
34- - uses : actions /setup-python@v5
35+ - uses : astral-sh /setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
3536 with :
3637 python-version : " 3.11"
3738
38- - name : Install protoc + build tools
39- run : |
40- sudo apt-get update && sudo apt-get install -y protobuf-compiler
41- pip install hatchling hatch-vcs grpcio-tools build
39+ - name : Install build tools
40+ run : uv sync
4241
4342 - name : Generate proto stubs (coordinode only)
4443 if : matrix.package.name == 'coordinode'
45- run : make proto
44+ run : uv run make proto
4645
4746 - name : Build wheel + sdist
4847 working-directory : ${{ matrix.package.path }}
49- run : python -m build
48+ run : uv run python -m build
5049
5150 - name : Upload dist artifact
52- uses : actions/upload-artifact@v4
51+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5352 with :
5453 name : dist-${{ matrix.package.name }}
5554 path : ${{ matrix.package.path }}/dist/
5655 retention-days : 1
5756
58- publish-testpypi :
59- name : Publish to TestPyPI (pre-release)
60- runs-on : ubuntu-latest
61- needs : build
62- if : contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc')
63- environment : testpypi
64- permissions :
65- id-token : write
66- strategy :
67- matrix :
68- package :
69- - coordinode
70- - langchain-coordinode
71- - llama-index-graph-stores-coordinode
72- steps :
73- - uses : actions/download-artifact@v4
74- with :
75- name : dist-${{ matrix.package }}
76- path : dist/
77-
78- - uses : pypa/gh-action-pypi-publish@release/v1
79- with :
80- repository-url : https://test.pypi.org/legacy/
81- packages-dir : dist/
82-
8357 publish-pypi :
84- name : Publish to PyPI (stable)
58+ name : Publish to PyPI
8559 runs-on : ubuntu-latest
8660 needs : build
87- if : " !contains(github.ref_name, 'a') && !contains(github.ref_name, 'b') && !contains(github.ref_name, 'rc')"
8861 environment : pypi
8962 permissions :
9063 id-token : write
@@ -95,12 +68,12 @@ jobs:
9568 - langchain-coordinode
9669 - llama-index-graph-stores-coordinode
9770 steps :
98- - uses : actions/download-artifact@v4
71+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
9972 with :
10073 name : dist-${{ matrix.package }}
10174 path : dist/
10275
103- - uses : pypa/gh-action-pypi-publish@release/v1
76+ - uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
10477 with :
10578 packages-dir : dist/
10679
@@ -111,13 +84,13 @@ jobs:
11184 permissions :
11285 contents : write
11386 steps :
114- - uses : actions/download-artifact@v4
87+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
11588 with :
11689 pattern : dist-*
11790 merge-multiple : true
11891 path : dist/
11992
120- - uses : softprops/action-gh-release@v2
93+ - uses : softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
12194 with :
12295 prerelease : ${{ contains(github.ref_name, 'a') || contains(github.ref_name, 'b') || contains(github.ref_name, 'rc') }}
12396 generate_release_notes : true
0 commit comments