From 928c7794c555c4956c1d82a109e5f947f31602c1 Mon Sep 17 00:00:00 2001 From: Samuel Searles-Bryant Date: Thu, 9 May 2024 00:21:34 +0100 Subject: [PATCH 1/2] Add a workflow to build and publish the package --- .github/workflows/build_publish.yaml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/build_publish.yaml diff --git a/.github/workflows/build_publish.yaml b/.github/workflows/build_publish.yaml new file mode 100644 index 0000000..b76dc23 --- /dev/null +++ b/.github/workflows/build_publish.yaml @@ -0,0 +1,35 @@ +name: Build and publish + +on: + pull_request: + push: + tags: + - v* + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + - uses: hynek/build-and-inspect-python-package@v2 + + publish: + runs-on: ubuntu-latest + timeout-minutes: 5 + + needs: [build] + if: github.repository_owner == 'samueljsb' && github.ref_type == 'tag' + + environment: publish + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 From 82f8c2dc07ec6e7ea6acc7044d86a46a9cacdb7e Mon Sep 17 00:00:00 2001 From: Samuel Searles-Bryant Date: Thu, 9 May 2024 00:25:08 +0100 Subject: [PATCH 2/2] Do not include tests in wheel This uses setuptools's automatic discovery, using the "flat-layout" approach. --- setup.cfg | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 0022fa6..1ea941a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,6 @@ classifiers = Programming Language :: Python :: Implementation :: CPython [options] -packages = - find: install_requires = attrs tokenize-rt