Skip to content

Commit

Permalink
Reversed versioning code, releases now publish on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
JoKra1 committed Dec 4, 2023
1 parent c96b6f6 commit b202edc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:

# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
# Only create release if pull-target was 'stable' or work-flow was triggered on 'stable'
if: github.ref_name == 'stable' || github.base_ref == 'stable'
# if: github.ref_name == 'stable' || github.base_ref == 'stable'
# Changed this, because the above did not work - instead simply release on new tags.
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -89,7 +91,8 @@ jobs:
publish-test:
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
if: startsWith(github.ref, 'refs/tags/')
# test pypi now gets all un-tagged pushes
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
needs:
- build
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ classifiers = [
# https://pypi.org/project/setuptools-scm/ - automatic version number based on tag
dynamic = ["version"]

[tool.setuptools_scm]
#https://github.com/pypa/setuptools_scm/issues/342
local_scheme = "no-local-version"
[tool.setuptools_scm]

0 comments on commit b202edc

Please sign in to comment.