1616 version : ${{ steps.version.outputs.pypi_version }}
1717 permissions :
1818 contents : write
19+ attestations : write
20+ id-token : write
1921
2022 defaults :
2123 run :
9597 examples/byokg-rag/byokg-notebooks-latest.zip
9698 retention-days : 30
9799
100+ - name : Generate checksums
101+ working-directory : ${{ github.workspace }}
102+ run : |
103+ cd byokg-rag/dist && sha256sum *.whl *.tar.gz > SHA256SUMS && cd ${{ github.workspace }}
104+ sha256sum examples/byokg-rag/byokg-notebooks-${{ steps.version.outputs.version }}.zip | sed 's|.*/||' >> byokg-rag/dist/SHA256SUMS
105+
106+ - name : Attest build provenance
107+ uses : actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
108+ with :
109+ subject-path : |
110+ byokg-rag/dist/*.whl
111+ byokg-rag/dist/*.tar.gz
112+ byokg-rag/dist/SHA256SUMS
113+ examples/byokg-rag/byokg-notebooks-${{ steps.version.outputs.version }}.zip
114+
98115 - name : Attach artifacts to GitHub Release
99116 uses : softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3
100117 with :
@@ -104,21 +121,25 @@ jobs:
104121 examples/byokg-rag/byokg-notebooks-latest.zip
105122 prerelease : false
106123
107- # pypi-publish:
108- # runs-on: ubuntu-latest
109- # needs: release-build
110- # permissions:
111- # id-token: write
112- # environment:
113- # name: pypi
114- # url: https://pypi.org/project/graphrag-byokg/${{ needs.release-build.outputs.version }}
115- # steps:
116- # - name: Download build artifacts
117- # uses: actions/download-artifact@v4
118- # with:
119- # name: byokg-rag-dist
120- # path: dist/
121- # - name: Remove non-versioned dist copies
122- # run: rm -f dist/*-latest.*
123- # - name: Publish to PyPI
124- # uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
124+ pypi-publish :
125+ if : github.event.action == 'released'
126+ runs-on : ubuntu-latest
127+ needs : release-build
128+ permissions :
129+ id-token : write
130+ attestations : write
131+ environment :
132+ name : pypi
133+ url : https://pypi.org/project/graphrag-byokg/${{ needs.release-build.outputs.version }}
134+ steps :
135+ - name : Download build artifacts
136+ uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
137+ with :
138+ name : byokg-rag-dist
139+ path : dist/
140+ - name : Remove non-versioned dist copies
141+ run : rm -f dist/*-latest.*
142+ - name : Publish to PyPI
143+ uses : pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
144+ with :
145+ attestations : true
0 commit comments