-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Victor Boissiere <victor.boissiere@qonto.com>
- Loading branch information
1 parent
1462914
commit 4453a7d
Showing
5 changed files
with
149 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: release | ||
run-name: building and publishing new release | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
# run only against tags | ||
tags: | ||
- "*" | ||
permissions: | ||
contents: write # allows the action to create a Github release | ||
id-token: write # This is required for requesting the AWS JWT | ||
|
||
jobs: | ||
build-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- run: git fetch --force --tags | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
|
||
- name: Set up QEMU for ARM64 build | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,29 @@ | ||
name: unittest | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- "*" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
go: | ||
name: go | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
- name: Install dependencies | ||
run: | | ||
go get . | ||
- name: Build | ||
run: go build | ||
- name: Run Go tests | ||
run: go test -v ./... | ||
|
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,68 @@ | ||
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json | ||
--- | ||
env: | ||
- BUILD_INFO_PACKAGE_PATH=github.com/qonto/terraform-plan-linter/cmd | ||
|
||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- '-s' | ||
- '-w' | ||
- '-X "{{ .Env.BUILD_INFO_PACKAGE_PATH }}.Version={{.Version}}"' | ||
- '-X "{{ .Env.BUILD_INFO_PACKAGE_PATH }}.CommitSHA={{.Commit}}"' | ||
- '-X "{{ .Env.BUILD_INFO_PACKAGE_PATH }}.Date={{.Date}}"' | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
use: github | ||
filters: | ||
exclude: | ||
- "^test:" | ||
- "^chore" | ||
- "merge conflict" | ||
- Merge pull request | ||
- Merge remote-tracking branch | ||
- Merge branch | ||
- go mod tidy | ||
groups: | ||
- title: Dependency updates | ||
regexp: '^.*?(feat|fix)\(deps\)!?:.+$' | ||
order: 300 | ||
- title: "New Features" | ||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' | ||
order: 100 | ||
- title: "Security updates" | ||
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$' | ||
order: 150 | ||
- title: "Bug fixes" | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 200 | ||
- title: "Documentation updates" | ||
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$ | ||
order: 400 | ||
- title: "Build process updates" | ||
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$ | ||
order: 400 | ||
- title: Other work | ||
order: 9999 | ||
|
||
release: | ||
github: | ||
owner: qonto | ||
name: terraform-plan-linter | ||
name_template: "v{{.Version}}" | ||
footer: | | ||
**Full Changelog**: https://github.com/qonto/terraform-plan-linter/compare/{{ .PreviousTag }}...{{ .Tag }} |
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,7 @@ | ||
package cmd | ||
|
||
var ( | ||
Version = "unknown" | ||
CommitSHA = "unknown" | ||
Date = "unknown" | ||
) |
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