diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 0c659a4f..c38d2ae7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -54,11 +54,18 @@ jobs: - name: Git diff run: git diff + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ vars.GORELEASER_APP_ID }} + private-key: ${{ secrets.GORELEASER_APP_PRIVATE_KEY }} + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest - args: release --clean + args: release --clean --snapshot env: + HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3e4d6226..6c26f168 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -25,6 +25,9 @@ builds: - amd64 - arm64 +snapshot: + version_template: "{{ incpatch .Version }}-devel" + signs: - artifacts: checksum args: ["-u", "code-signing-key@openinfrastructure.co", "--output", "${signature}", "--detach-sign", "${artifact}"] @@ -50,3 +53,39 @@ changelog: exclude: - "^docs:" - "^test:" + +source: + enabled: true + name_template: '{{ .ProjectName }}_{{ .Version }}_source_code' + +sboms: + - id: source + artifacts: source + documents: + - "{{ .ProjectName }}_{{ .Version }}_sbom.spdx.json" + +brews: + - name: holos + repository: + owner: holos-run + name: homebrew-tap + branch: main + token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" + directory: Formula + homepage: "https://holos.run" + description: "Holos CLI" + dependencies: + - name: helm + type: optional + - name: kubectl + type: optional + install: | + bin.install "holos" + bash_output = Utils.safe_popen_read(bin/"holos", "completion", "bash") + (bash_completion/"holos").write bash_output + zsh_output = Utils.safe_popen_read(bin/"holos", "completion", "zsh") + (zsh_completion/"holos").write zsh_output + fish_output = Utils.safe_popen_read(bin/"holos", "completion", "fish") + (fish_completion/"holos.fish").write fish_output + test: | + system "#{bin}/holos version" diff --git a/version/embedded/patch b/version/embedded/patch index d00491fd..0cfbf088 100644 --- a/version/embedded/patch +++ b/version/embedded/patch @@ -1 +1 @@ -1 +2