Skip to content

Commit

Permalink
fix: publication to PyPiTest
Browse files Browse the repository at this point in the history
  • Loading branch information
qdelamea-aneo committed Nov 20, 2024
1 parent 943ac77 commit 2055c7a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,4 @@ armonik = "armonik_cli.cli:cli"

[tool.setuptools_scm]
version_scheme = "post-release"
local_scheme = "no-local-version"
version_file = "src/armonik_cli/_version.py"
14 changes: 14 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from os import environ
from setuptools import setup
from setuptools_scm import ScmVersion


def get_local_schema(version: ScmVersion) -> str:
run_id = environ.get("GITHUB_RUN_ID", "0")
release = environ.get("RELEASE", "")
if not release:
return f".dev{run_id}"
return ""


setup(use_scm_version={"local_scheme": get_local_schema})

0 comments on commit 2055c7a

Please sign in to comment.