Skip to content

Commit

Permalink
Test Publishing - Korrektur Build-Workflow
Browse files Browse the repository at this point in the history
Signed-off-by: dornech <[email protected]>
  • Loading branch information
dornech committed Nov 24, 2024
1 parent eb8dae3 commit 6d8fdb4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
runs-on: ubuntu-latest
environment: release
needs: build-test
if: startsWith(github.ref, 'refs/tags/')
# if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/heads/main')
permissions:
contents: write
id-token: write
Expand All @@ -64,7 +65,7 @@ jobs:
run: |
hatch build
- name: Publish 📦 to Test PyPI
if: startsWith(github.ref, 'refs/heads/main')
# if: startsWith(github.ref, 'refs/heads/main')
uses: pypa/gh-action-pypi-publish@release/v1
with:
id-token: write
Expand All @@ -75,7 +76,7 @@ jobs:
# password: ${{ secrets.TEST_PYPI_SECRECT }}
# repository-url: https://test.pypi.org/legacy/
- name: Publish 📦 to PyPI
if: startsWith(github.ref, 'refs/heads/main')
# if: startsWith(github.ref, 'refs/heads/main')
uses: pypa/gh-action-pypi-publish@release/v1
with:
id-token: write
Expand Down
3 changes: 3 additions & 0 deletions src/pytestdornech/skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class LogLevel(str, enum.Enum):
INFO = 'info'
DEBUG = 'debug'


def fib(n: int) -> int:
"""Fibonacci example function"""
if not n > 0:
Expand All @@ -47,6 +48,7 @@ def fib(n: int) -> int:
a, b = b, a + b
return a


def setup_logging(log_level: LogLevel):
"""Setup basic logging"""
log_format = '[%(asctime)s] %(levelname)s:%(name)s:%(message)s'
Expand All @@ -59,6 +61,7 @@ def setup_logging(log_level: LogLevel):
help='Dornechs testpackage',
)


@app.command()
def main(
n: Annotated[int, typer.Argument(..., min=1, help='Positive integer')] = 7,
Expand Down

0 comments on commit 6d8fdb4

Please sign in to comment.