From c85de70ffeaca77401911d2c03467ed666fa72f6 Mon Sep 17 00:00:00 2001 From: razzle Date: Mon, 18 Mar 2024 15:02:55 -0500 Subject: [PATCH 1/3] chore(release): update goreleaser to make a PR against the tap instead of commiting to main Signed-off-by: razzle --- .goreleaser.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index fec6226549..ebd711baeb 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -54,7 +54,7 @@ sboms: snapshot: name_template: "{{ incpatch .Version }}-snapshot" -# Use the auto-generated changlog github provides +# Use the auto-generated changelog github provides changelog: use: github-native @@ -76,10 +76,15 @@ brews: owner: defenseunicorns name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + branch: "{{ .ProjectName }}-{{ .Tag }}" pull_request: enabled: true + base: + branch: main + owner: defenseunicorns + name: homebrew-tap - commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" + commit_msg_template: "chore(release): {{ .ProjectName }}@{{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" From d37647ad7a9bbd7e7f7308fb15929a39d079ba5d Mon Sep 17 00:00:00 2001 From: razzle Date: Mon, 18 Mar 2024 15:07:10 -0500 Subject: [PATCH 2/3] chore(release): update goreleaser to make a PR against the tap instead of commiting to main Signed-off-by: razzle --- .goreleaser.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index ebd711baeb..268d686298 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -84,7 +84,7 @@ brews: owner: defenseunicorns name: homebrew-tap - commit_msg_template: "chore(release): {{ .ProjectName }}@{{ .Tag }}" + commit_msg_template: "chore(release): upgrade {{ .ProjectName }} to {{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" @@ -95,7 +95,14 @@ brews: owner: defenseunicorns name: homebrew-tap token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" - commit_msg_template: "Brew formula update for {{ .ProjectName }} versioned release {{ .Tag }}" + branch: "{{ .ProjectName }}-{{ .Tag }}" + pull_request: + enabled: true + base: + branch: main + owner: defenseunicorns + name: homebrew-tap + commit_msg_template: "chore(release): {{ .ProjectName }}@{{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" From 4e245a7907b1c814754773c5df2bcc6d89925d5e Mon Sep 17 00:00:00 2001 From: razzle Date: Mon, 18 Mar 2024 15:15:36 -0500 Subject: [PATCH 3/3] build(release): use official action Signed-off-by: razzle --- .github/workflows/release.yml | 9 +++++---- .goreleaser.yaml | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d647b98c49..ba6ecc10e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -175,11 +175,12 @@ jobs: - name: Get Brew tap repo token id: brew-tap-token - uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0 + uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0 with: - application_id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }} - application_private_key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }} - organization: defenseunicorns + app-id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }} + private-key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }} + owner: defenseunicorns + repositories: homebrew-tap # Create the GitHub release notes, upload artifact backups to S3, publish homebrew recipe - name: Run GoReleaser diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 268d686298..2699443597 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -84,7 +84,7 @@ brews: owner: defenseunicorns name: homebrew-tap - commit_msg_template: "chore(release): upgrade {{ .ProjectName }} to {{ .Tag }}" + commit_msg_template: "build(release): upgrade {{ .ProjectName }} to {{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" @@ -102,7 +102,7 @@ brews: branch: main owner: defenseunicorns name: homebrew-tap - commit_msg_template: "chore(release): {{ .ProjectName }}@{{ .Tag }}" + commit_msg_template: "build(release): {{ .ProjectName }}@{{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap"