Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ jobs:
SEMVER_REGEX="version = \"([0-9]+)\.([0-9]+)\.([0-9]+)([-]{0,1})(((b{0,1})|(rc{0,1}))[\.]{0,1}[0-9]+){0,1}\""
sed -i -E "s/$SEMVER_REGEX/version = \"$NEXT_VERSION\"/g" pyproject.toml

- name: Commit version bump
run: |
git add pyproject.toml
git commit -m "Release: $GITHUB_SHA"
git push --force

- name: Build and publish wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.DJTOOLS_PYPI_TOKEN }}
run: |
uv build
uv run twine upload dist/*

- name: Commit changes
run: |
git add pyproject.toml
git commit -m "Release: $GITHUB_SHA"
git push --force
uv run twine upload --skip-existing dist/*
14 changes: 7 additions & 7 deletions .github/workflows/release-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ jobs:
SEMVER_REGEX="version = \"([0-9]+)\.([0-9]+)\.([0-9]+)([-]{0,1})(((b{0,1})|(rc{0,1}))[\.]{0,1}[0-9]+){0,1}\""
sed -i -E "s/$SEMVER_REGEX/version = \"$NEXT_VERSION\"/g" pyproject.toml

- name: Commit version bump
run: |
git add pyproject.toml
git commit -m "Release: $GITHUB_SHA"
git push --force

- name: Build and publish wheel
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.DJTOOLS_PYPI_TOKEN }}
run: |
uv build
uv run twine upload dist/*

- name: Commit changes
run: |
git add pyproject.toml
git commit -m "Release: $GITHUB_SHA"
git push --force
uv run twine upload --skip-existing dist/*
1 change: 1 addition & 0 deletions src/djtools/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def get_version() -> str:

if match:
suffix = version.split(match)[-1]

if suffix and not suffix.startswith("-"):
version = f"{match}-{suffix}"

Expand Down