Skip to content

Commit 9c718b6

Browse files
committed
fix: Rework release publishing
The PyPI upload failed with: Checking dist/reverse_argparse-2.0.8-py3-none-any.whl: PASSED Checking dist/multiple.intoto.jsonl: ERROR InvalidDistribution: Unknown distribution format: 'multiple.intoto.jsonl' I suppose the provenance can't be included in the `dist` directory for the PyPI upload, but it needs to be in there for python-semantic-release publish to GitHub Releases action. This commit reorders things, such that we publish to GitHub first, and save PyPI for last, and between the two we remove the provenance from the `dist` directory. Hopefully this works.
1 parent 27cb67b commit 9c718b6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/semantic-release.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,13 @@ jobs:
9999
name: ${{ needs.provenance.outputs.provenance-name }}
100100
path: dist
101101

102-
- name: Publish to PyPI
103-
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
104-
105102
- name: Publish to GitHub Releases
106103
uses: python-semantic-release/publish-action@b717f67f7e7e9f709357bce5a542846503ce46ec # v10.2.0
107104
with:
108105
github_token: ${{ secrets.GH_TOKEN }}
106+
107+
- name: Remove Provenance for PyPI Upload
108+
run: rm -f dist/${{ needs.provenance.outputs.provenance-name }}
109+
110+
- name: Publish to PyPI
111+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1

0 commit comments

Comments
 (0)