Skip to content

Commit e24998b

Browse files
caarlos0Copilot
andauthored
ci: drop pre-cosign-v3 goreleaser versions from tests (#554)
GoReleaser v2.13.0 was the first release to ship the cosign v3 sigstore-bundle 'checksums.txt.sigstore.json' alongside the archive. Earlier releases only publish a cosign v2 detached '.sig', which the action's verifier does not understand and silently skips. Drop '~> 1.26' / '~> 2.6' / 'v0.182.0' / '~> v1' from the matrix and the install tests; pin '~> 2.13' as the minimum-supported version we actively exercise in CI. Document v2.13.0 as the minimum cosign- verifiable version in the README. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent be2e8a3 commit e24998b

File tree

3 files changed

+15
-25
lines changed

3 files changed

+15
-25
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ jobs:
3232
- windows-latest
3333
version:
3434
- latest
35-
- '~> 2.6'
36-
- '~> 1.26'
35+
- '~> 2.13'
3736
distribution:
3837
- goreleaser
3938
- goreleaser-pro
@@ -74,8 +73,7 @@ jobs:
7473
matrix:
7574
version:
7675
- latest
77-
- '~> 2.6'
78-
- '~> 1.26'
76+
- '~> 2.13'
7977
distribution:
8078
- goreleaser
8179
- goreleaser-pro

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ action will additionally verify the cosign sigstore signature of the
8989
checksums file against the GoReleaser release workflow's OIDC identity. If
9090
`cosign` isn't installed, this step is silently skipped.
9191

92+
> **Note**: cosign signature verification requires GoReleaser **v2.13.0 or
93+
> newer** (and the matching `nightly`). Earlier releases ship a `.sig`
94+
> detached signature signed with cosign v2, which is not compatible with
95+
> the cosign v3 sigstore-bundle format the action verifies. For older
96+
> versions the cosign step is silently skipped — only the `checksums.txt`
97+
> SHA-256 verification runs.
98+
9299
To enable signature verification, install cosign before running the action:
93100

94101
```yaml
@@ -106,8 +113,8 @@ To enable signature verification, install cosign before running the action:
106113
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107114
```
108115
109-
Both checksum and signature verification work for tagged releases and the
110-
`nightly` channel.
116+
Both checksum and signature verification work for tagged releases (≥ v2.13.0)
117+
and the `nightly` channel.
111118

112119
### Run on new tag
113120

__tests__/goreleaser.test.ts

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,18 @@ import * as io from '@actions/io';
66
import * as goreleaser from '../src/goreleaser';
77

88
describe('install', () => {
9-
it('acquires v0.182.0 version of GoReleaser', async () => {
10-
const bin = await goreleaser.install('goreleaser', 'v0.182.0');
11-
expect(fs.existsSync(bin)).toBe(true);
12-
}, 100000);
13-
149
it('acquires latest version of GoReleaser', async () => {
1510
const bin = await goreleaser.install('goreleaser', 'latest');
1611
expect(fs.existsSync(bin)).toBe(true);
1712
}, 100000);
1813

19-
it('acquires v0.182.0-pro version of GoReleaser Pro', async () => {
20-
const bin = await goreleaser.install('goreleaser-pro', 'v0.182.0-pro');
21-
expect(fs.existsSync(bin)).toBe(true);
22-
}, 100000);
23-
24-
it('acquires latest v1 version of GoReleaser', async () => {
25-
const bin = await goreleaser.install('goreleaser', '~> v1');
26-
expect(fs.existsSync(bin)).toBe(true);
27-
}, 100000);
28-
29-
it('acquires latest v1 version of GoReleaser Pro', async () => {
30-
const bin = await goreleaser.install('goreleaser-pro', '~> v1');
14+
it('acquires latest v2 version of GoReleaser', async () => {
15+
const bin = await goreleaser.install('goreleaser', '~> v2');
3116
expect(fs.existsSync(bin)).toBe(true);
3217
}, 100000);
3318

34-
it('acquires latest v2 version of GoReleaser', async () => {
35-
const bin = await goreleaser.install('goreleaser', '~> v2');
19+
it('acquires v2.13.0 (minimum cosign-verifiable) version of GoReleaser', async () => {
20+
const bin = await goreleaser.install('goreleaser', 'v2.13.0');
3621
expect(fs.existsSync(bin)).toBe(true);
3722
}, 100000);
3823

0 commit comments

Comments
 (0)