Skip to content

Commit a8f6c86

Browse files
Merge pull request #143 from jacksonpradolima/codex/add-release-verification-workflow-steps
Add release signing and lockfile checks
2 parents 02bed7e + f2e2998 commit a8f6c86

File tree

4 files changed

+1161
-858
lines changed

4 files changed

+1161
-858
lines changed

.github/workflows/code_quality.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
run: |
2828
uv sync --frozen --extra dev
2929
30+
- name: Check lockfile freshness
31+
run: uv lock --check
32+
3033
- name: Run tests with coverage
3134
run: |
3235
uv run pytest --cov=gsppy --cov-branch --cov-report=term-missing:skip-covered --cov-report=xml

.github/workflows/publish.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
name: pypi
1313
url: https://pypi.org/project/gsppy/
1414
permissions:
15+
contents: write
1516
id-token: write
1617
steps:
1718
- uses: actions/checkout@v6
@@ -30,5 +31,31 @@ jobs:
3031
run: |
3132
python -m build
3233
34+
- name: Install Syft
35+
uses: anchore/sbom-action/download-syft@v0.17.0
36+
37+
- name: Generate SBOM (CycloneDX)
38+
run: syft packages dist -o cyclonedx-json=dist/sbom.json
39+
40+
- name: Install sigstore
41+
run: python -m pip install sigstore==3.5.1
42+
43+
- name: Sign distributions
44+
run: |
45+
cd dist
46+
sigstore sign *.whl *.tar.gz
47+
48+
- name: Upload release assets
49+
uses: softprops/action-gh-release@v2
50+
with:
51+
files: |
52+
dist/*.whl
53+
dist/*.tar.gz
54+
dist/*.whl.sig
55+
dist/*.tar.gz.sig
56+
dist/*.whl.pem
57+
dist/*.tar.gz.pem
58+
dist/sbom.json
59+
3360
- name: Publish package distributions to PyPI
3461
uses: pypa/gh-action-pypi-publish@v1.13.0

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,28 @@ make bench-big # run large benchmark
202202
> [!NOTE]
203203
> Tox in this project uses the "tox-uv" plugin. When running `make tox` or `tox`, missing Python interpreters can be provisioned automatically via uv (no need to pre-install all versions). This makes local setup faster.
204204
205+
## 🔏 Release assets and verification
206+
207+
Every GitHub release bundles artifacts to help you validate what you download:
208+
209+
- Built wheels and source distributions produced by the automated publish workflow.
210+
- `sbom.json` (CycloneDX) generated with [Syft](https://github.com/anchore/syft).
211+
- Sigstore-generated `.sig` and `.pem` files for each artifact, created using GitHub OIDC identity.
212+
213+
To verify a downloaded artifact from a release:
214+
215+
```bash
216+
python -m pip install sigstore # installs the CLI
217+
sigstore verify identity \
218+
--certificate gsppy-<version>-py3-none-any.whl.pem \
219+
--signature gsppy-<version>-py3-none-any.whl.sig \
220+
--cert-identity "https://github.com/jacksonpradolima/gsp-py/.github/workflows/publish.yml@refs/tags/v<version>" \
221+
--cert-oidc-issuer https://token.actions.githubusercontent.com \
222+
gsppy-<version>-py3-none-any.whl
223+
```
224+
225+
Replace `<version>` with the numeric package version (for example, `3.1.1`) in the filenames; in `--cert-identity`, this becomes `v<version>` (for example, `v3.1.1`). Adjust the filenames for the sdist (`.tar.gz`) if preferred. The same release page also hosts `sbom.json` for supply-chain inspection.
226+
205227
## 📖 Documentation
206228

207229
- **Live site:** https://jacksonpradolima.github.io/gsp-py/

0 commit comments

Comments
 (0)