From 5b618300f6a8f0fb6f73eb10beee4c2f368f1e9d Mon Sep 17 00:00:00 2001 From: Max Lindqvist Date: Thu, 2 Oct 2025 17:47:54 +0200 Subject: [PATCH 1/2] Added .github/workflows/publish.yml --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..eaff1cd --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,34 @@ +name: Publish Python Package + +on: + push: + branches: + - main + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build the package + run: python -m build + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ # Use API token + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload dist/* + From 9b745bba411b25283b5e3633aec5d8be8e541e49 Mon Sep 17 00:00:00 2001 From: Max Lindqvist Date: Thu, 2 Oct 2025 17:48:51 +0200 Subject: [PATCH 2/2] Commented the publishing stage --- .github/workflows/publish.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index eaff1cd..d91ffc6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -26,9 +26,10 @@ jobs: - name: Build the package run: python -m build - - name: Publish to PyPI - env: - TWINE_USERNAME: __token__ # Use API token - TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: twine upload dist/* + # Uncomment to publish on pypi + #- name: Publish to PyPI + # env: + # TWINE_USERNAME: __token__ # Use API token + # TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + # run: twine upload dist/*