From 7193aa34f16e9a2fedff6fd0c83743ec6fbd2ded Mon Sep 17 00:00:00 2001 From: Daniel Alley Date: Thu, 19 Nov 2026 13:42:09 -0500 Subject: [PATCH] Attest PyPI release build provenance Add GitHub build provenance attestations for plugin and Python client distributions published to PyPI. Assisted By: Codex --- CHANGES/+use-actions-attest.misc | 1 + templates/github/.github/workflows/publish.yml.j2 | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 CHANGES/+use-actions-attest.misc diff --git a/CHANGES/+use-actions-attest.misc b/CHANGES/+use-actions-attest.misc new file mode 100644 index 00000000..cce7e4e9 --- /dev/null +++ b/CHANGES/+use-actions-attest.misc @@ -0,0 +1 @@ +Use `actions/attest` to generate build provenance for published packages. diff --git a/templates/github/.github/workflows/publish.yml.j2 b/templates/github/.github/workflows/publish.yml.j2 index 8c381ef0..305c5563 100644 --- a/templates/github/.github/workflows/publish.yml.j2 +++ b/templates/github/.github/workflows/publish.yml.j2 @@ -37,6 +37,8 @@ jobs: name: "pypi" url: "https://pypi.org/p/{{ plugin_name | dash }}" permissions: + attestations: "write" + contents: "read" id-token: "write" steps: @@ -45,6 +47,11 @@ jobs: name: "plugin_package" path: "dist/" + - name: "Attest package build provenance" + uses: "actions/attest@v4" + with: + subject-path: "dist/*" + - name: "Publish package to PyPI" uses: pypa/gh-action-pypi-publish@release/v1 @@ -59,6 +66,8 @@ jobs: environment: name: "pypi" permissions: + attestations: "write" + contents: "read" id-token: "write" steps: @@ -76,6 +85,11 @@ jobs: tar -xvf {{ plugin.app_label }}-python-client.tar {%- endfor %} + - name: "Attest Python client build provenance" + uses: "actions/attest@v4" + with: + subject-path: "{{ plugin_name }}/dist/*" + - name: "Publish client to pypi" uses: "pypa/gh-action-pypi-publish@release/v1" with: