diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b6c9cb8..26c76c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,28 +3,22 @@ name: Publish CwMath Package on: push: branches: - - main - paths: - - 'src/**' - - 'setup.py' + - 'main' jobs: build-and-publish: name: Build and Publish - runs-on: ubuntu-latest - + runs-on: 'ubuntu-latest' + environment: + name: pypi + url: https://pypi.org/p/cwmath + permissions: + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: 3.10 - - - run: python -m pip install --upgrade pip - - run: pip install pip-tools - - run: pip-sync - - - run: python -m build --sdist --wheel --outdir dist/ . + python-version: '3.10' + - run: pip install build + - run: python -m build - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml index ba81f30..69ab8f8 100644 --- a/.github/workflows/test_publish.yml +++ b/.github/workflows/test_publish.yml @@ -14,20 +14,13 @@ jobs: url: https://test.pypi.org/p/cwmath permissions: id-token: write - steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: '3.10' - -# - run: python -m pip install --upgrade pip -# - run: pip install pip-tools - run: pip install build -# - run: pip-sync - - run: python -m build - - uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/