forked from mogensen/helm-changelog
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a3b8df
commit 164f235
Showing
3 changed files
with
126 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,35 @@ | ||
name: Build and Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
types: [opened, reopened, synchronize, ready_for_review] | ||
branches: | ||
- '*' | ||
- 'main' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
if: "!github.event.pull_request.draft" | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macOS-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
name: Build & Test | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
- | ||
name: Setup go | ||
uses: actions/setup-go@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '^1.16.0' | ||
- | ||
name: Download dependencies | ||
|
||
- name: Download dependencies | ||
run: go mod download | ||
- | ||
name: Build & Test | ||
|
||
- name: Build & Test | ||
run: | | ||
go build -o ./helm-changelog -v ./cmd/ | ||
go test ./... | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
args: release --snapshot --skip-publish --rm-dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
project_name: helm-changelog | ||
|
||
builds: | ||
- binary: helm-changelog | ||
main: ./ | ||
|
||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -trimpath | ||
ldflags: | ||
- -s -w -X main.version={{.Version}} | ||
|
||
goos: | ||
- windows | ||
- darwin | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^doc:' | ||
- '^chore:' | ||
- '^test:' | ||
- '^tests:' | ||
|
||
archives: | ||
- id: helm-changelog | ||
name_template: '{{ .ProjectName }}_v{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
format: tar.gz | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
files: | ||
- LICENSE | ||
|
||
docker_manifests: | ||
- name_template: 'ghcr.io/traefik/helm-changelog:{{ .Tag }}' | ||
image_templates: | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-amd64' | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-arm64' | ||
- name_template: 'ghcr.io/traefik/helm-changelog:latest' | ||
image_templates: | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-amd64' | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-arm64' | ||
- name_template: 'ghcr.io/traefik/helm-changelog:v{{ .Major }}.{{ .Minor }}' | ||
image_templates: | ||
- 'ghcr.io/traefik/helm-changelog:v{{ .Major }}.{{ .Minor }}-amd64' | ||
- 'ghcr.io/traefik/helm-changelog:v{{ .Major }}.{{ .Minor }}-arm64' | ||
|
||
dockers: | ||
- use: buildx | ||
goos: linux | ||
goarch: amd64 | ||
dockerfile: buildx.Dockerfile | ||
image_templates: | ||
- 'ghcr.io/traefik/helm-changelog:latest-amd64' | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-amd64' | ||
- 'ghcr.io/traefik/helm-changelog:v{{ .Major }}.{{ .Minor }}-amd64' | ||
build_flag_templates: | ||
- '--pull' | ||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys | ||
- '--label=org.opencontainers.image.title={{.ProjectName}}' | ||
- '--label=org.opencontainers.image.description=Myrmica Bibikoffi - Closes stale issues' | ||
- '--label=org.opencontainers.image.source={{.GitURL}}' | ||
- '--label=org.opencontainers.image.url={{.GitURL}}' | ||
- '--label=org.opencontainers.image.documentation={{.GitURL}}' | ||
- '--label=org.opencontainers.image.created={{.Date}}' | ||
- '--label=org.opencontainers.image.revision={{.FullCommit}}' | ||
- '--label=org.opencontainers.image.version={{.Version}}' | ||
- '--platform=linux/amd64' | ||
|
||
- use: buildx | ||
goos: linux | ||
goarch: arm64 | ||
dockerfile: buildx.Dockerfile | ||
image_templates: | ||
- 'ghcr.io/traefik/helm-changelog:latest-arm64' | ||
- 'ghcr.io/traefik/helm-changelog:{{ .Tag }}-arm64' | ||
- 'ghcr.io/traefik/helm-changelog:v{{ .Major }}.{{ .Minor }}-arm64' | ||
build_flag_templates: | ||
- '--pull' | ||
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys | ||
- '--label=org.opencontainers.image.title={{.ProjectName}}' | ||
- '--label=org.opencontainers.image.description=Myrmica Bibikoffi - Closes stale issues' | ||
- '--label=org.opencontainers.image.source={{.GitURL}}' | ||
- '--label=org.opencontainers.image.url={{.GitURL}}' | ||
- '--label=org.opencontainers.image.documentation={{.GitURL}}' | ||
- '--label=org.opencontainers.image.created={{.Date}}' | ||
- '--label=org.opencontainers.image.revision={{.FullCommit}}' | ||
- '--label=org.opencontainers.image.version={{.Version}}' | ||
- '--platform=linux/arm64' |