-
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: Ardika Bagus <[email protected]>
- Loading branch information
Showing
3 changed files
with
125 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,42 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
test: | ||
uses: ./.github/workflows/test.yaml | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.21.x | ||
|
||
- name: Get Tag | ||
id: tag | ||
uses: devops-actions/[email protected] | ||
with: | ||
strip_v: true | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RELEASE_VERSION: ${{ steps.tag.outputs.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,40 @@ | ||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- "**/*.go" | ||
|
||
workflow_call: | ||
|
||
jobs: | ||
audit: | ||
name: Auditing the code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.21.x | ||
|
||
- name: Install make | ||
run: | | ||
sudo apt update -y | ||
sudo apt install make curl git -y | ||
- name: Run audit | ||
run: | | ||
make lint | ||
make test | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./output/coverage.out |
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,43 @@ | ||
version: 1 | ||
before: | ||
hooks: | ||
- go mod tidy | ||
|
||
builds: | ||
- binary: helmize | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
goarm: | ||
- "6" | ||
- "7" | ||
ldflags: | ||
- -X github.com/ardikabs/helmize/cmd.Version={{.Version}} | ||
- -X github.com/ardikabs/helmize/cmd.GitCommit={{.Commit}} | ||
ignore: | ||
- goos: windows | ||
goarch: arm64 | ||
|
||
archives: | ||
- format: binary | ||
|
||
changelog: | ||
filters: | ||
exclude: | ||
- "^Release version" | ||
- "^Merge pull request" | ||
|
||
checksum: | ||
name_template: "checksums.txt" | ||
|
||
release: | ||
github: | ||
owner: ardikabs | ||
name: helmize | ||
name_template: "Version {{.Version}}" |