diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml index 53d5bf25..d0b445ac 100644 --- a/.github/workflows/publish_to_pypi.yml +++ b/.github/workflows/publish_to_pypi.yml @@ -12,24 +12,19 @@ jobs: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - - uses: actions/checkout@v3 - - uses: webfactory/ssh-agent@v0.8.0 - with: - ssh-private-key: | - ${{ secrets.REST2_SSH_KEY }} - ${{ secrets.MLCLOUDS_SSH_KEY }} + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: 3.9 - - name: Install dependencies + - name: Install dependencies and Build run: | python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + pip install setuptools build + python -m build --sdist --wheel --outdir dist/ . + - name: Check distribution files run: | - python setup.py sdist bdist_wheel - twine --verbose upload dist/* + pip install twine + twine check dist/* + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1