From 6d5c93abf7e013ae93e6fa914ebd13d63ea8e234 Mon Sep 17 00:00:00 2001 From: bnb32 Date: Thu, 25 Apr 2024 11:04:55 -0600 Subject: [PATCH] pypi publish updates --- .github/workflows/publish_to_pypi.yml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) 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