11---
2- name : 🚀 Publish Release
2+ name : Publish Release
33on :
44 release :
55 types : [published]
@@ -9,57 +9,124 @@ permissions:
99concurrency :
1010 group : release-${{ github.ref }}
1111 cancel-in-progress : true
12+
1213jobs :
13- publish :
14- name : 📦 Publish ${{ matrix.package }}
14+ # Phase 1: Publish haive-core first (no dependencies)
15+ publish-core :
16+ name : Publish haive-core
17+ runs-on : ubuntu-latest
18+ env :
19+ ACTIONS_STEP_DEBUG : ${{ secrets.ACTIONS_DEBUG || 'false' }}
20+ steps :
21+ - name : Checkout Code
22+ uses : actions/checkout@v4
23+ with :
24+ submodules : true
25+ token : ${{ secrets.GH_TOKEN }}
26+ - name : Get Package Poetry Info
27+ id : poetry
28+ uses : ./.github/actions/get-package-poetry-info
29+ with :
30+ package : haive-core
31+ - name : Set up Python ${{ steps.poetry.outputs.python }}
32+ uses : actions/setup-python@v5
33+ with :
34+ python-version : ${{ steps.poetry.outputs.python }}
35+ cache : poetry
36+ - name : Install Poetry
37+ run : pipx install poetry==2.1.0
38+ - name : Configure PyPI Credentials
39+ run : poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
40+ - name : Build and Publish haive-core
41+ run : |
42+ cd packages/haive-core
43+ poetry build --format wheel
44+ poetry publish --skip-existing
45+ - name : Upload Artifact
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : haive-core-dist
49+ path : packages/haive-core/dist/
50+
51+ # Phase 2: Publish haive-agents (depends on haive-core)
52+ publish-agents :
53+ name : Publish haive-agents
54+ needs : publish-core
55+ runs-on : ubuntu-latest
56+ env :
57+ ACTIONS_STEP_DEBUG : ${{ secrets.ACTIONS_DEBUG || 'false' }}
58+ steps :
59+ - name : Checkout Code
60+ uses : actions/checkout@v4
61+ with :
62+ submodules : true
63+ token : ${{ secrets.GH_TOKEN }}
64+ - name : Get Package Poetry Info
65+ id : poetry
66+ uses : ./.github/actions/get-package-poetry-info
67+ with :
68+ package : haive-agents
69+ - name : Set up Python ${{ steps.poetry.outputs.python }}
70+ uses : actions/setup-python@v5
71+ with :
72+ python-version : ${{ steps.poetry.outputs.python }}
73+ cache : poetry
74+ - name : Install Poetry
75+ run : pipx install poetry==2.1.0
76+ - name : Configure PyPI Credentials
77+ run : poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
78+ - name : Build and Publish haive-agents
79+ run : |
80+ cd packages/haive-agents
81+ poetry build --format wheel
82+ poetry publish --skip-existing
83+ - name : Upload Artifact
84+ uses : actions/upload-artifact@v4
85+ with :
86+ name : haive-agents-dist
87+ path : packages/haive-agents/dist/
88+
89+ # Phase 3: Publish remaining packages in parallel (depend on haive-agents)
90+ publish-remaining :
91+ name : Publish ${{ matrix.package }}
92+ needs : publish-agents
1593 runs-on : ubuntu-latest
1694 env :
1795 ACTIONS_STEP_DEBUG : ${{ secrets.ACTIONS_DEBUG || 'false' }}
1896 strategy :
97+ fail-fast : false
1998 matrix :
2099 package :
21- - haive-core
22- - haive-agents
23100 - haive-games
24101 - haive-tools
25102 - haive-prebuilt
26103 - haive-dataflow
27104 steps :
28- - name : 📥 Checkout Code
105+ - name : Checkout Code
29106 uses : actions/checkout@v4
30107 with :
31108 submodules : true
32109 token : ${{ secrets.GH_TOKEN }}
33- - name : 📦 Get Package Poetry Info
110+ - name : Get Package Poetry Info
34111 id : poetry
35112 uses : ./.github/actions/get-package-poetry-info
36113 with :
37114 package : ${{ matrix.package }}
38- - name : 🧾 Echo Package Metadata
39- run : |
40- echo "📦 Name: ${{ steps.poetry.outputs.name }}"
41- echo "🔖 Version: ${{ steps.poetry.outputs.version }}"
42- echo "🧑 Authors: ${{ steps.poetry.outputs.authors || 'N/A' }}"
43- echo "📄 License: ${{ steps.poetry.outputs.license || 'N/A' }}"
44- echo "📝 Description: ${{ steps.poetry.outputs.description || 'N/A' }}"
45- echo "🌐 Homepage: ${{ steps.poetry.outputs.homepage || 'N/A' }}"
46- echo "🔗 Repository: ${{ steps.poetry.outputs.repository || 'N/A' }}"
47- echo "📚 Docs: ${{ steps.poetry.outputs.documentation || 'N/A' }}"
48- echo "🏷 Classifiers: ${{ steps.poetry.outputs.classifiers || 'N/A' }}"
49- - name : 🐍 Set up Python ${{ steps.poetry.outputs.python }}
115+ - name : Set up Python ${{ steps.poetry.outputs.python }}
50116 uses : actions/setup-python@v5
51117 with :
52118 python-version : ${{ steps.poetry.outputs.python }}
53119 cache : poetry
54- - name : 🛠 Install Poetry
120+ - name : Install Poetry
55121 run : pipx install poetry==2.1.0
56- - name : 🔐 Configure PyPI Credentials
122+ - name : Configure PyPI Credentials
57123 run : poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
58- - name : 📦 Build Package (No Publish)
124+ - name : Build and Publish ${{ matrix.package }}
59125 run : |
60126 cd packages/${{ matrix.package }}
61127 poetry build --format wheel
62- - name : 📤 Upload Package as Artifact
128+ poetry publish --skip-existing
129+ - name : Upload Artifact
63130 uses : actions/upload-artifact@v4
64131 with :
65132 name : ${{ matrix.package }}-dist
0 commit comments