From f1a64437f3a46d8097ee71ef26f12023b0215e70 Mon Sep 17 00:00:00 2001 From: Fabrice Brito Date: Fri, 13 Dec 2024 11:16:04 +0100 Subject: [PATCH] Update package.yaml --- .github/workflows/package.yaml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml index 6dda9a7..0989281 100644 --- a/.github/workflows/package.yaml +++ b/.github/workflows/package.yaml @@ -27,19 +27,17 @@ jobs: run: | # python -m pip install --upgrade pip pip install hatch + - name: Build package run: hatch build + - name: Test package run: hatch -e test run nose2 --verbose + - name: Publish package distributions to Test PyPI - if: github.ref != 'refs/heads/main' - uses: pypa/gh-action-pypi-publish@release/v1 - with: - skip-existing: true - repository-url: https://test.pypi.org/legacy/ - - name: Publish package distributions to PyPI - if: github.ref == 'refs/heads/master' - uses: pypa/gh-action-pypi-publish@release/v1 - with: - skip-existing: true - repository-url: https://upload.pypi.org/legacy/ + env: + TWINE_USERNAME: __token__ # Use '__token__' as the username + TWINE_PASSWORD: ${{ secrets.PYPI_APIKEY }} # PyPI API token stored as a secret + run: | + hatch build + hatch publish