Skip to content

Commit

Permalink
Added PyPi Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelloeater committed Jan 6, 2025
1 parent 33d9dc4 commit a8a45a7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/release_gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
test:
uses: ./.github/workflows/test.yml
release-gen:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -22,6 +25,7 @@ jobs:
generateReleaseNotes: true

build-and-push-image:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -54,3 +58,16 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
publish:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test

on:
workflow_call:
pull_request: { }
push:
branches: [ main ]
Expand All @@ -26,4 +27,9 @@ jobs:
max_attempts: 3
retry_on: error
command: task test

- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
poetry_install_options: "--sync --no-root"
poetry_publish_options: "--dry-run"
4 changes: 2 additions & 2 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ tasks:
silent: false
interactive: false
cmds:
- poetry run vulture --min-confidence 100 {{.BUILD_DIR}}
- poetry run xenon --max-absolute C --max-modules B --max-average B {{.BUILD_DIR}}
# - poetry run vulture --min-confidence 100 {{.BUILD_DIR}}
# - poetry run xenon --max-absolute C --max-modules B --max-average B {{.BUILD_DIR}}
# - poetry run mypy --install-types --non-interactive
# - poetry run mypy {{.BUILD_DIR}} # Little too aggressive
- poetry run pytest --cov --cov-fail-under=80 tests/test_main.py
Expand Down

0 comments on commit a8a45a7

Please sign in to comment.