Skip to content

Commit

Permalink
chore: post-release version bump
Browse files Browse the repository at this point in the history
Signed-off-by: Rongrong <[email protected]>
  • Loading branch information
Rongronggg9 committed Nov 4, 2023
1 parent 3f69fb0 commit 2896a56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ jobs:
python -m pip install build --user
- name: Build a binary wheel and a source tarball
run: |
git describe --tags --always | \
sed -E \
-e 's#^v##' \
-e 's#([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)-([[:digit:]]+)(-.+)?#\1.post\2#g' \
-e 's#^#__version__ = "#' \
-e 's#$#"#' \
>src/version.py
ahead="$(git describe --tags --always | cut -s -d- -f 2)"
if [ -n "$ahead" ]; then
grep -Pq "^__version__\s*=\s*['\"].*\.dev['\"]\s*\$" src/version.py || exit 1
sed -i "s/\.dev/\.dev$ahead/" src/version.py
fi
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.0"
__version__ = "2.4.0.dev"

0 comments on commit 2896a56

Please sign in to comment.