Skip to content

Commit

Permalink
update release doc, fix goreleaser.yaml, add goreleaser check action
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudBeard committed Oct 4, 2024
1 parent 55b8b60 commit 57a50bc
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 5 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/goreleaser-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: GoReleaser Check

on:
push:
paths:
- '.goreleaser.yaml'
pull_request:
paths:
- '.goreleaser.yaml'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang

- name: Install GoReleaser
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200
with:
install-only: true

- name: Run GoReleaser Check
run: goreleaser check
8 changes: 5 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

before:
hooks:
- go mod tidy
Expand Down Expand Up @@ -36,7 +38,7 @@ sboms:
- "sbom_{{ .ProjectName }}_{{ .Tag }}_{{- title .Os }}_{{ .Arch }}.sbom"

snapshot:
name_template: "{{ incpatch .Version }}-snapshot"
version_template: "{{ incpatch .Version }}-snapshot"

# Use the auto-generated changelog github provides
changelog:
Expand All @@ -56,7 +58,7 @@ brews:
owner: defenseunicorns
name: homebrew-tap
commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/lula"
homepage: "https://lula.dev"
description: "The Compliance Validator"

# NOTE: We are using .Version instead of .Tag because homebrew has weird semver parsing rules and won't be able to
Expand All @@ -74,7 +76,7 @@ brews:
owner: defenseunicorns
name: homebrew-tap
commit_msg_template: "Brew formula update for {{ .ProjectName }} versioned release {{ .Tag }}"
homepage: "https://github.com/defenseunicorns/lula"
homepage: "https://lula.dev"
description: "The Compliance Validator"

# Generate a GitHub release and publish the release for the tag
Expand Down
7 changes: 5 additions & 2 deletions docs/community-and-contribution/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ The most important prefixes you should have in mind are:

### How can I influence the version number for a release?

PR titles should also follow this pattern and are linted using [commitlint](https://commitlint.js.org/). The PR title will determine the version bump. When a PR is merged (squashed) release-please will kick off a release PR. When that release PR is approved and merged, release-please will create a draft release. Once that draft release is published go-releaser with build and publish the assets.
PR titles should also follow this pattern and are linted using [commitlint](https://commitlint.js.org/). The PR title will determine the version bump. When a PR is merged (squashed) release-please will kick off a release PR. When that release PR is approved and merged, release-please will create a draft release. Once that draft release is published go-releaser with build and publish the assets,including creating a release in our Homebrew tap repository: [https://github.com/defenseunicorns/homebrew-tap](https://github.com/defenseunicorns/homebrew-tap)

- Pre-v1.0.0 release-please is configured to bump minors on breaking changes and patches otherwise. per [release-please-config](https://github.com/defenseunicorns/lula/blob/main/release-please-config.json)

### How do I fix a release issue?
Expand All @@ -42,8 +43,10 @@ The CHANGELOG is not required to be updated, only the release notes must be upda

#### Other issues and helpful tips

- Confirm that the goreleaser configuration is valid by using the [goreleaser cli](https://goreleaser.com/cmd/goreleaser_check/?h=valid)
- Manual approach: Confirm that the goreleaser configuration is valid by using the [goreleaser cli](https://goreleaser.com/cmd/goreleaser_check/?h=valid).

```sh
goreleaser check .goreleaser.yaml [flags]
```

- Automated approach: On Push and Pull Request the [GoReleaserGitHub Action Workflow](./github/workflows/goreleaser-check.yaml) will run the `goreleaser check` command

0 comments on commit 57a50bc

Please sign in to comment.