From 1881a5d8f34a8aa1c3ef1f1b34e4c15d8ada0758 Mon Sep 17 00:00:00 2001 From: 8go <17750857+8go@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:04:05 +0000 Subject: [PATCH] Create release.yml adding digital attestation --- .github/workflows/release.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1cdd84f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +# See https://blog.pypi.org/posts/2024-11-14-pypi-now-supports-digital-attestations/ +# https://github.com/pypa/gh-action-pypi-publish +# https://github.com/pypa/sampleproject/blob/main/.github/workflows/release.yml + +name: Release + +on: + push: + branches: + - main + +jobs: + build-and-publish: + runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install build dependencies + run: python -m pip install -U setuptools wheel build + - name: Build + run: python -m build . + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip-existing: true + verbose: true +