diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cadc9a40..b4bd84aa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,23 +8,21 @@ jobs: pypi-publish: name: Publish release to PyPI runs-on: ubuntu-latest - environment: - name: pypi - url: https://test.pypi.org/p/GEB-model - permissions: - id-token: write steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.x" + python-version: "3.12" - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + pip install build twine - name: Build package + run: python -m build + - name: Publish package distributions to Test PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.TESTPYPI }} run: | - python -m build - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file + python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/* \ No newline at end of file