File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,19 @@ jobs:
4040 with :
4141 persist-credentials : false
4242
43+ - name : Install build
44+ run : python -Im pip install build
45+
4346 - name : Get the dist version
4447 id : dist-version
45- run : >-
46- echo "version=$(
47- grep ^__version__ src/trio/_version.py
48- | sed 's#__version__ = "\([^"]\+\)"#\1#'
49- )"
50- >> "${GITHUB_OUTPUT}"
48+ shell : python
49+ run : |
50+ import os
51+ import build.util
52+ version = build.util.project_wheel_metadata(".").version
53+
54+ with open(os.environ["GITHUB_OUTPUT"], mode="a", encoding="utf8") as f:
55+ f.write(f"version={version}")
5156
5257 - name : Set the expected dist artifact names
5358 id : artifact-name
5863 DIST_NAME : ${{ env.dist-name }}
5964 VERSION : ${{ steps.dist-version.outputs.version }}
6065
61- - name : Install build
62- run : python -Im pip install build
63-
6466 - name : Build dists
6567 run : python -Im build
6668 - name : Verify that the artifacts with expected names got created
You can’t perform that action at this time.
0 commit comments