Skip to content

Commit f9ca88d

Browse files
authored
Take tui-kit v0.2.8: hashed pip install, provenance bundle on the release (#8)
1 parent df922a3 commit f9ca88d

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,14 @@ jobs:
142142

143143
- name: package metadata matches the manifest
144144
run: |
145-
# Pinned: check-nfpm.py reads .goreleaser.yaml, so the parser it
146-
# uses is part of the check. Bump it here by hand.
147-
python3 -m pip install --quiet --disable-pip-version-check pyyaml==6.0.3
148145
go mod download github.com/tui-tools/tui-kit
149146
kit=$(go list -m -f '{{.Dir}}' github.com/tui-tools/tui-kit)
147+
# check-nfpm.py reads .goreleaser.yaml, so the parser it uses is
148+
# part of the check. The kit pins it by version and by the hash of
149+
# every wheel of that version (tools/requirements.txt), and pip
150+
# refuses anything that does not match.
151+
python3 -m pip install --quiet --disable-pip-version-check \
152+
--require-hashes -r "$kit/tools/requirements.txt"
150153
python3 "$kit/tools/check-nfpm.py" --manifest tool.json \
151154
--config .goreleaser.yaml
152155
@@ -257,6 +260,7 @@ jobs:
257260
# produced each file. `gh attestation verify <file> -R tui-tools/tui-firewall`
258261
# checks a download against it without any key to distribute.
259262
- name: attest build provenance
263+
id: attest
260264
uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2
261265
with:
262266
subject-path: |
@@ -265,3 +269,14 @@ jobs:
265269
dist/*.rpm
266270
dist/*.pkg.tar.zst
267271
dist/checksums.txt
272+
273+
# The attestation lives in GitHub's store, which `gh attestation verify`
274+
# reads; Scorecard's Signed-Releases check reads the release's assets
275+
# instead, and looks for a `*.intoto.jsonl`. The same bundle, attached
276+
# under that name, satisfies both readers.
277+
- name: attach the provenance bundle to the release
278+
env:
279+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
280+
run: |
281+
cp "${{ steps.attest.outputs.bundle-path }}" dist/provenance.intoto.jsonl
282+
gh release upload "$GITHUB_REF_NAME" dist/provenance.intoto.jsonl --clobber

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/charmbracelet/bubbles v1.0.0
77
github.com/charmbracelet/bubbletea v1.3.10
88
github.com/charmbracelet/lipgloss v1.1.0
9-
github.com/tui-tools/tui-kit v0.2.5
9+
github.com/tui-tools/tui-kit v0.2.8
1010
)
1111

1212
require (

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc
3838
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
3939
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
4040
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
41-
github.com/tui-tools/tui-kit v0.2.5 h1:zsqk3LVoDgp7FLEHK3opjiCAQ4ou0bvzl689kr7Tn9s=
42-
github.com/tui-tools/tui-kit v0.2.5/go.mod h1:Vpg1NcQ5ktylMvXTzsixdHjLUNxhntR3ZYSOYaQ7/FQ=
41+
github.com/tui-tools/tui-kit v0.2.8 h1:tfrMSjWVjJsbGum884kXQB2N1OUqf6L6Dnoj9Wgu9TE=
42+
github.com/tui-tools/tui-kit v0.2.8/go.mod h1:Vpg1NcQ5ktylMvXTzsixdHjLUNxhntR3ZYSOYaQ7/FQ=
4343
github.com/xo/terminfo v1.0.0 h1:2ZpYzqWzyyytjk3TP6aJVDhkMAkc99/1xKQdA3TDTBY=
4444
github.com/xo/terminfo v1.0.0/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=
4545
golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI=

0 commit comments

Comments
 (0)