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:
40
40
with :
41
41
persist-credentials : false
42
42
43
+ - name : Install build
44
+ run : python -Im pip install build
45
+
43
46
- name : Get the dist version
44
47
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}")
51
56
52
57
- name : Set the expected dist artifact names
53
58
id : artifact-name
58
63
DIST_NAME : ${{ env.dist-name }}
59
64
VERSION : ${{ steps.dist-version.outputs.version }}
60
65
61
- - name : Install build
62
- run : python -Im pip install build
63
-
64
66
- name : Build dists
65
67
run : python -Im build
66
68
- name : Verify that the artifacts with expected names got created
You can’t perform that action at this time.
0 commit comments