File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,17 @@ jobs:
6565 # And only on a push event, not a pull_request.
6666 if : ${{ github.event_name == 'push' }}
6767 runs-on : ubuntu-latest
68+ permissions :
69+ id-token : write
6870 defaults :
6971 run :
7072 shell : bash -l {0}
7173 env :
7274 PKG_NAME : " activity-browser-dev25"
7375 steps :
76+ - uses : actions/checkout@v4
77+ with :
78+ fetch-depth : 0
7479 - name : Overwrite package name
7580 run : |
7681 sed -i "s/name = \"activity_browser\"/name=\"$PKG_NAME\"/" pyproject.toml
7984 python -m pip install build --user
8085 - name : Build a binary wheel and a source tarball
8186 run : |
87+ export GIT_DESCRIBE_TAG=`git describe --tags`
8288 python -m build --outdir dist/ .
8389 - name : Publish distribution 📦 to Test PyPI
8490 uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 88 version = os .environ ["PKG_VERSION" ]
99else :
1010 version = os .environ .get ("GIT_DESCRIBE_TAG" , "0.0.0" )
11+ if "-" in version :
12+ versions = version .split ("-" )
13+ version = "{}.post{}" .format (versions [0 ], versions [1 ])
1114
1215setup (
1316 version = version ,
You can’t perform that action at this time.
0 commit comments