Skip to content

fix: emit source archive from GoReleaser for attestation coverage#34

Merged
millerjp merged 1 commit intomainfrom
fix/goreleaser-source-archive
Apr 21, 2026
Merged

fix: emit source archive from GoReleaser for attestation coverage#34
millerjp merged 1 commit intomainfrom
fix/goreleaser-source-archive

Conversation

@millerjp
Copy link
Copy Markdown

Summary

First real release (v0.9.0) failed at the `actions/attest-build-provenance` step:

```
Error: Could not find subject at path dist/*.tar.gz
```

Root cause: the previous `.goreleaser.yml` declared `archives:` without a build context (`builds: [{skip: true}]`), so GoReleaser only wrote metadata files to `dist/` — no tarball.

Fix

Replace the empty `archives:` with a `source:` block that uses GoReleaser's built-in source archiver. No build context required; one `syncmap-{version}-source.tar.gz` is emitted per run.

```yaml
source:
enabled: true
name_template: "{{ .ProjectName }}-{{ .Version }}-source"
format: tar.gz
```

Local snapshot now produces:

```
dist/
├── artifacts.json
├── checksums.txt
├── config.yaml
├── metadata.json
└── syncmap-v0.9.0-SNAPSHOT-7c5343b-source.tar.gz
```

Next steps

After merge:

  1. Delete the broken v0.9.0 release + tag.
  2. Re-dispatch release.yml with `tag=v0.9.0` and `dry_run=false`.
  3. Verify attestation via `gh attestation verify`.
  4. If green, dispatch v1.0.0.

The previous config declared an `archives:` block without a build
context, which produced no actual archive — GoReleaser only wrote
metadata files to dist/. The `actions/attest-build-provenance`
step added in #33 globs `dist/*.tar.gz`, so the first real release
(v0.9.0) failed at the attest step with "Could not find subject
at path dist/*.tar.gz".

Replace the empty `archives:` block with a `source:` block that
emits a `{project}-{version}-source.tar.gz` using GoReleaser's
built-in source archiver. No build context required; one tar.gz
is emitted into dist/ for every release and dry run, which the
attestation step then signs under keyless Sigstore.

Verified locally: `goreleaser release --snapshot --clean
--skip=publish` now produces `dist/syncmap-*-source.tar.gz`.
@millerjp millerjp merged commit 59d7958 into main Apr 21, 2026
@millerjp millerjp deleted the fix/goreleaser-source-archive branch April 21, 2026 06:07
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant