11name : Publish
22on :
33 push :
4- tags :
5- - ' *'
4+ tags : ['*']
65jobs :
76 build :
87 runs-on : ubuntu-latest
98 outputs :
109 hash : ${{ steps.hash.outputs.hash }}
1110 steps :
1211 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13- - uses : actions /setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4 .0
12+ - uses : astral-sh /setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb # v6.1 .0
1413 with :
15- python-version : ' 3.x '
16- cache : pip
17- cache-dependency-path : requirements*/*.txt
18- - run : pip install -r requirements/build.txt
19- # Use the commit date instead of the current date during the build.
14+ enable-cache : true
15+ prune- cache : false
16+ - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
17+ with :
18+ python-version-file : pyproject.toml
2019 - run : echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
21- - run : python -m build
22- # Generate hashes used for provenance.
20+ - run : uv build
2321 - name : generate hash
2422 id : hash
2523 run : cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
26- - uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
24+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
2725 with :
2826 path : ./dist
2927 provenance :
@@ -37,14 +35,12 @@ jobs:
3735 with :
3836 base64-subjects : ${{ needs.build.outputs.hash }}
3937 create-release :
40- # Upload the sdist, wheels, and provenance to a GitHub release. They remain
41- # available as build artifacts for a while as well.
4238 needs : [provenance]
4339 runs-on : ubuntu-latest
4440 permissions :
4541 contents : write
4642 steps :
47- - uses : actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
43+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
4844 - name : create release
4945 run : >
5046 gh release create --draft --repo ${{ github.repository }}
@@ -54,22 +50,14 @@ jobs:
5450 GH_TOKEN : ${{ github.token }}
5551 publish-pypi :
5652 needs : [provenance]
57- # Wait for approval before attempting to upload to PyPI. This allows reviewing the
58- # files in the draft release.
5953 environment :
6054 name : publish
6155 url : https://pypi.org/project/blinker/${{ github.ref_name }}
6256 runs-on : ubuntu-latest
6357 permissions :
6458 id-token : write
6559 steps :
66- - uses : actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
67- - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
68- with :
69- repository-url : https://test.pypi.org/legacy/
70- packages-dir : artifact/
71- skip-existing : true
72- attestations : false
60+ - uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
7361 - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
7462 with :
7563 packages-dir : artifact/
0 commit comments