-
Notifications
You must be signed in to change notification settings - Fork 1
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
aea9fca
commit 18b3536
Showing
2 changed files
with
80 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,33 @@ | ||
name: Release | ||
on: | ||
push: | ||
tags: ["v*"] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.19' | ||
- name: get version | ||
id: version | ||
run: echo ::set-output name=version::$(basename ${GITHUB_REF}) | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.version }} |
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,47 @@ | ||
project_name: dbctl | ||
|
||
builds: | ||
- id: dbctl | ||
binary: dbctl | ||
main: . | ||
|
||
ldflags: | ||
- -X cmd.version={{.Version}} | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- darwin | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
|
||
archives: | ||
- id: dbctl | ||
builds: [dbctl] | ||
name_template: "{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}" | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
|
||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
|
||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^Merge pull request' |