File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,23 +26,16 @@ jobs:
2626 - name : Install hatch
2727 run : uv tool install hatch
2828
29- - name : Build distributions with uv
30- run : uv build --wheel
31-
32- - name : Add build tag
29+ - name : Inject unique build tag into version
3330 run : |
34- FILE_WHL=$(ls dist/*.whl)
35- BASE_WHL=$(basename "$FILE_WHL")
36-
37- DIST="python_em511"
3831 VERSION=$(grep '^version' pyproject.toml | head -1 | cut -d '"' -f2)
39- BUILD="${{ github.run_number }}${{ github.run_attempt }}"
40- SUFFIX=$(echo "$BASE_WHL" | cut -d'-' -f3-)
32+
33+ BUILD="${{ github.run_id }}${{ github.run_number }}${{ github.run_attempt }}"
34+ sed -i "s/^version = \".*\"/version = \"${VERSION}-${BUILD}\"/" pyproject.toml
4135
42- NEW="dist/${DIST}-${VERSION}-${BUILD}-${SUFFIX}"
36+ - name : Build distributions with uv
37+ run : uv build --wheel
4338
44- mv "$FILE_WHL" "$NEW"
45-
4639 - name : Upload distributions as artifact
4740 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4841 with :
You can’t perform that action at this time.
0 commit comments