suzuki-shunsuke / go-release-workflow

GitHub Actions Reusable Workflow for Go Application
MIT License
2 stars 0 forks source link

Separate jobs of build and release for security #91

Open suzuki-shunsuke opened 3 days ago

suzuki-shunsuke commented 3 days ago

Now this workflow builds and releases assets using GoReleaser in the same job. But in terms of security, and to meet SLSA Level 3, we should separate build and release jobs.

One of concerns is releases to Winget and Homebrew. I'm not sure if I can implement them without GoReleaser by myself.

suzuki-shunsuke commented 3 days ago

https://github.com/aquaproj/aqua/blob/main/.goreleaser.yml

suzuki-shunsuke commented 3 days ago

Maybe we can build assets by goreleaser build and release them by goreleaser release in another job.

Build:

      --skip strings       Skip the given options (valid options are: before, post-hooks, pre-hooks, validate)

Release:

      --skip strings                 Skip the given options (valid options are announce, archive, aur, before, chocolatey, docker, homebrew, ko, nfpm, nix, notarize, publish, sbom, scoop, sign, snapcraft, validate, winget)

      --snapshot                     Generate an unversioned snapshot release, skipping all validations and without publishing any artifacts (implies --skip=announce,publish,validate)
suzuki-shunsuke commented 2 days ago

Separating build and sign and release may be a feature of GoReleaser Pro.

https://goreleaser.com/cmd/goreleaser_continue/