bug: [Consolidate publishing and signing distributions into one step]#61
bug: [Consolidate publishing and signing distributions into one step]#61leoromanovsky merged 4 commits intomainfrom
Conversation
aarsilv
left a comment
There was a problem hiding this comment.
Thanks for making this more similar to other SDKs! I like having creating a GitHub release as the common way to publish across SDKs
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
this line is what allows manual publishing; we may want to keep it
There was a problem hiding this comment.
What is the purpose of manual publishing?
There was a problem hiding this comment.
Debugging. It would allow us to retry the workflow without making a new release, and while we can retry a failed release action, it can be handy for retrying when the action technically succeeds but didn't do what you want.
| - name: Create GitHub Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: >- | ||
| gh release create | ||
| '${{ github.ref_name }}' | ||
| --repo '${{ github.repository }}' | ||
| --notes "" | ||
| - name: Upload artifact signatures to GitHub Release | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| # Upload to GitHub Release using the `gh` CLI. | ||
| # `dist/` contains the built packages, and the | ||
| # sigstore-produced signatures and certificates. | ||
| run: >- | ||
| gh release upload | ||
| '${{ github.ref_name }}' dist/** | ||
| --repo '${{ github.repository }}' |
There was a problem hiding this comment.
The github release already exists at this point so this is not needed.
| - name: Sign the dists with Sigstore | ||
| uses: sigstore/gh-action-sigstore-python@v2.1.1 | ||
| with: | ||
| inputs: >- | ||
| ./dist/*.tar.gz | ||
| ./dist/*.whl |
There was a problem hiding this comment.
combine into one publish
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
conforms to readme
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: |
There was a problem hiding this comment.
What is the purpose of manual publishing?
labels: mergeable
Fixes: #issue
Motivation and Context
Publish with signing fails because at that step the release has already been made; it attempts to create another one: https://github.com/Eppo-exp/python-sdk/actions/runs/9945729712/job/27474683642
This seems to only happen to me because I'm used to creating a Github release like in the other SDKs. If just pushing to a tag without a release the process likely works.
Description
How has this been tested?
Difficult to test: suggestions welcome but we might need to iterate on it.