Skip to content

Commit

Permalink
Fix version on github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Aug 30, 2023
1 parent 34ef17f commit a83e756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Print GutHub branch
run: env
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -130,7 +132,8 @@ jobs:
with:
name: artifact
path: dist
skip-existing: true
- name: List dist directory
run: ls dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def prerelease_local_scheme(version):
"""
from setuptools_scm.version import get_local_node_and_date

if os.getenv('CIRCLE_BRANCH') in {'master'} or os.getenv('CI_BRANCH') in {'master'}:
if (os.getenv('CIRCLE_BRANCH') or os.getenv('CI_BRANCH') or
os.getenv('GITHUB_BASE_REF')) in {'master'}:
return ''
else:
return get_local_node_and_date(version)
Expand Down

0 comments on commit a83e756

Please sign in to comment.