Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: automate releases and generate slsa provenance #240

Conversation

netomi
Copy link
Contributor

@netomi netomi commented Sep 12, 2023

This fixes #239 .

It uses the existing release-drafter config and the generic slsa generator workflow.

This PR adds the following changes:

  • adds a new workflow release.yml that triggers when tags with name [v*] are being created
  • it will build the app as distribution (zip file), generate slsa provenance for it and attach it to a release prepared by release drafter
  • after the release preparation have been completed, you can manually publish the release (it will be a draft after the workflow has been completed)

This PR is an attempt to automate releases using existing configurations. In the long term, switch to jreleaser seems like the way to go, however this will affect the release notes. Also the builder workflow for jreleaser and slsa is not really mature atm, using the generic generator is a safe solution for now imho.

cc @mbarbero

@netomi
Copy link
Contributor Author

netomi commented Sep 12, 2023

I was testing the release workflow in a fork: https://github.com/OtterdogTest/macos-notarization-service/actions/runs/6156752670

@netomi
Copy link
Contributor Author

netomi commented Sep 12, 2023

Added a simple script to download releases from a GitHub repo and verify them with the attached provenance: https://gitlab.eclipse.org/eclipsefdn/security/scripts/-/blob/main/github/download-github-release.sh?ref_type=heads

Output is something like this:

tn@proteus:~/workspace/eclipse/tmp$ ./download-github-release.sh -r OtterdogTest/macos-notarization-service -v 1.2.0 -a macos-notarization-service
REPO = OtterdogTest/macos-notarization-service
VERSION = 1.2.0
ARTIFACT = macos-notarization-service
Downloaded artifact 'macos-notarization-service-1.2.0.zip'
Downloaded provenance 'macos-notarization-service-1.2.0.zip.intoto.jsonl'
Verified signature against tlog entry index 35832649 at URL: https://rekor.sigstore.dev/api/v1/log/entries/24296fb24b8ad77a974d0969c1794c4ee66430f39ee346c823fdafbaca7c018e078063cbd51b58b7
Verified build using builder "https://github.com/slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@refs/tags/v1.9.0" at commit 0ae0a91fac3e0e4ff7ae2b2e5718c68d1cb38e9a
Verifying artifact macos-notarization-service-1.2.0.zip: PASSED

PASSED: Verified SLSA provenance

@mbarbero mbarbero merged commit 13022f1 into eclipse-cbi:main Sep 12, 2023
@eclipse-cbi-bot eclipse-cbi-bot added the enhancement New feature or request label Sep 12, 2023
@netomi netomi deleted the support-automatic-releases-and-slsa-provenance branch December 5, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate releases and include slsa provenance
3 participants