File tree Expand file tree Collapse file tree 3 files changed +20
-7
lines changed
Expand file tree Collapse file tree 3 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 name : python-package-distributions
2929 path : dist/
30+ - name : Get version for github release
31+ run : python get_version
32+ - name : Store the version
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : version.semver
36+ path : ./
3037
3138 publish-to-testpypi :
3239 name : Publish Python 🐍 distribution 📦 to TestPyPI
@@ -76,14 +83,17 @@ jobs:
7683 inputs : >-
7784 ./dist/*.tar.gz
7885 ./dist/*.whl
86+ - name : Get version for release
87+ uses : actions/download-artifact@v4
88+ with :
89+ name : version.semver
90+ path : ./
7991 - name : Create GitHub Release
8092 env :
8193 GITHUB_TOKEN : ${{ github.token }}
82- run : >-
83- gh release create
84- '${{ github.ref_name }}'
85- --repo '${{ github.repository }}'
86- --notes ""
94+ run : |
95+ VERSION=$(cat ./version.semver)
96+ gh release create $VERSION --repo '${{ github.repository }}' --notes ""
8797 - name : Upload artifact signatures to GitHub Release
8898 env :
8999 GITHUB_TOKEN : ${{ github.token }}
92102 # sigstore-produced signatures and certificates.
93103 run : >-
94104 gh release upload
95- '${{ github.ref_name }}' dist/**
105+ $VERSION dist/**
96106 --repo '${{ github.repository }}'
Original file line number Diff line number Diff line change 11# Project specific
2-
2+ * .semver
33
44# Byte-compiled / optimized / DLL files
55__pycache__ /
Original file line number Diff line number Diff line change 1+ from src import example_package_samuelhomberg
2+ with open ("version.semver" , "w" ) as f :
3+ f .write (example_package_samuelhomberg .__version__ )
You can’t perform that action at this time.
0 commit comments