diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2999f3f..5328306 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,23 +4,26 @@ on: release: types: [published] + jobs: - deploy: + pypi-publish: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/interpax + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements-dev.txt - - name: Build package - run: python -m build --sdist --wheel - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements-dev.txt + - name: Build package + run: python -m build --sdist --wheel + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1