diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml deleted file mode 100644 index fb00284f..00000000 --- a/.github/workflows/deploy.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release deploy - -on: - release: - types: - - published - -jobs: - publish: - timeout-minutes: 20 - runs-on: ubuntu-latest - steps: - - name: Checkout 🛎️ - uses: actions/checkout@v4.2.2 - with: - fetch-depth: 0 - - - name: Setup Python 🔧 - uses: actions/setup-python@v5.4.0 - with: - python-version: 3.11 - - - name: Build 🔧 & Deploy 🚀 - env: - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: | - pip install tox twine wheel - - echo -e "[pypi]" >> ~/.pypirc - echo -e "username = __token__" >> ~/.pypirc - echo -e "password = $PYPI_TOKEN" >> ~/.pypirc - - python setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..13760228 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +catname: upload release to PyPI +on: + release: + types: + - published + +jobs: + pypi-publish: + name: upload release to PyPI + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + contents: write + steps: + - uses: actions/checkout@v4.2.2 + with: + fetch-depth: 0 + fetch-tags: true + + - uses: actions/setup-python@v5.4.0 + with: + python-version: 3.13 + + - name: Install build + run: | + pip install setuptools-scm wheel + + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1