From 053884130fa1db636d33fa9982886dd983079ad9 Mon Sep 17 00:00:00 2001 From: razzle Date: Thu, 21 Mar 2024 15:01:57 -0500 Subject: [PATCH] build(release): create PRs on `homebrew-tap` (#2385) ## Description Change from creating 2 commits directly on `defenseunicorns/homebrew-tap` to creating a PR. ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [x] [Contributor Guide Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow) followed --------- Signed-off-by: razzle --- .github/workflows/release.yml | 9 +++++---- .goreleaser.yaml | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 7 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 fec6226549..2699443597 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: "build(release): upgrade {{ .ProjectName }} to {{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap" @@ -90,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: "build(release): {{ .ProjectName }}@{{ .Tag }}" homepage: "https://zarf.dev/" description: "DevSecOps for Air Gap"