-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #335 from richardsheridan/reproducible_sha1
reproducibility/provenance for wheels
- Loading branch information
Showing
2 changed files
with
16 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,7 +81,12 @@ jobs: | |
python -m pip install -r requirements/build.txt | ||
- name: Build sdist wheel | ||
run: | | ||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \ | ||
python -m build --no-isolation # already isolated & build deps pinned | ||
- name: Check distribution | ||
run: | | ||
python -m pip install twine | ||
twine check --strict dist/* | ||
- name: Set outputs | ||
id: outputs | ||
run: | | ||
|
@@ -93,6 +98,7 @@ jobs: | |
requirements/test.txt \ | ||
| base64 -w 0 | ||
)" >> $GITHUB_OUTPUT | ||
cd dist && sha256sum * >> $GITHUB_STEP_SUMMARY | ||
- name: Upload build artifact | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -331,10 +337,13 @@ jobs: | |
run: | | ||
python -m pip install -U pip | ||
python -m pip install twine | ||
- name: Check distribution | ||
run: twine check dist/* | ||
- name: Publish to Pypi | ||
run: twine upload dist/* | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
- name: Upload to GitHub | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ github.ref_name }} dist/* --repo ${{ github.repository }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters