diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f03265..37abc0a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -60,10 +60,12 @@ jobs: - name: Install dependencies run: | - openssl version python -m pip install --upgrade twisted coverage build - - name: Test + - name: Test build on each supported python + run: python -m build . + + - name: Test code run: | coverage run -m twisted.trial constantly mv .coverage .coverage.${{ matrix.python-version }} @@ -75,6 +77,7 @@ jobs: path: .coverage.* if-no-files-found: error # 'warn' or 'ignore' are also available. + coverage: name: Combine & check coverage. needs: testing @@ -155,6 +158,10 @@ jobs: release-publish: name: Check release and publish on twisted-* tag runs-on: 'ubuntu-latest' + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: - uses: actions/checkout@v3 @@ -163,10 +170,14 @@ jobs: with: python-version: '${{ env.DEFAULT_PYTHON_VERSION }}' + - name: Install dependencies + run: | + python -m pip install --upgrade build + - name: Build run: | rm -rf dist/* - pipx run --python=python build . + python -m build . - name: Files to be pushed to PyPi run: ls -R dist/ @@ -179,7 +190,7 @@ jobs: - name: Publish to PyPI - on tag if: startsWith(github.ref, 'refs/tags/') - uses: pypa/gh-action-pypi-publish@a56da0b891b3dc519c7ee3284aff1fad93cc8598 + uses: pypa/gh-action-pypi-publish@release/v1 # We have this job so that the PR can be blocked on a single job. diff --git a/pyproject.toml b/pyproject.toml index 1f9877b..9016d4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,3 +42,6 @@ versionfile_source = "constantly/_version.py" versionfile_build = "constantly/_version.py" tag_prefix = "" parentdir_prefix = "constantly-" + +[bdist_wheel] +universal=0