-
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.
Adding goreleaser to release binaries
Signed-off-by: Tejas Wanjari <[email protected]>
- Loading branch information
Showing
6 changed files
with
173 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,101 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
# run only against tags | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
# packages: write | ||
# issues: write | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch all tags | ||
run: git fetch --force --tags | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.18 | ||
|
||
- name: Build stompd | ||
# You may pin to the exact commit or the version. | ||
# uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef | ||
uses: goreleaser/[email protected] | ||
with: | ||
# GoReleaser Distribution (goreleaser or goreleaser-pro) | ||
## distribution: # optional, default is goreleaser | ||
# GoReleaser version | ||
## version: # optional, default is latest | ||
# Arguments to pass to GoReleaser | ||
args: build --rm-dist --config .goreleaser.yaml | ||
# Working directory (below repository root) | ||
workdir: cmd/stompd/ | ||
# Just install GoReleaser | ||
## install-only: # optional, default is false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build stomper | ||
# You may pin to the exact commit or the version. | ||
# uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef | ||
uses: goreleaser/[email protected] | ||
with: | ||
# GoReleaser Distribution (goreleaser or goreleaser-pro) | ||
## distribution: # optional, default is goreleaser | ||
# GoReleaser version | ||
## version: # optional, default is latest | ||
# Arguments to pass to GoReleaser | ||
args: build --rm-dist --config .goreleaser.yaml | ||
# Working directory (below repository root) | ||
workdir: cmd/stomper/ | ||
# Just install GoReleaser | ||
## install-only: # optional, default is false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Release stompd | ||
# You may pin to the exact commit or the version. | ||
# uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef | ||
uses: goreleaser/[email protected] | ||
with: | ||
# GoReleaser Distribution (goreleaser or goreleaser-pro) | ||
## distribution: # optional, default is goreleaser | ||
# GoReleaser version | ||
## version: # optional, default is latest | ||
# Arguments to pass to GoReleaser | ||
args: release --rm-dist --config .goreleaser.yaml | ||
# Working directory (below repository root) | ||
workdir: cmd/stompd/ | ||
# Just install GoReleaser | ||
## install-only: # optional, default is false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Release stomper | ||
# You may pin to the exact commit or the version. | ||
# uses: goreleaser/goreleaser-action@68acf3b1adf004ac9c2f0a4259e85c5f66e99bef | ||
uses: goreleaser/[email protected] | ||
with: | ||
# GoReleaser Distribution (goreleaser or goreleaser-pro) | ||
## distribution: # optional, default is goreleaser | ||
# GoReleaser version | ||
## version: # optional, default is latest | ||
# Arguments to pass to GoReleaser | ||
args: release --rm-dist --config .goreleaser.yaml | ||
# Working directory (below repository root) | ||
workdir: cmd/stomper/ | ||
# Just install GoReleaser | ||
## install-only: # optional, default is false | ||
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 |
---|---|---|
|
@@ -17,3 +17,5 @@ | |
# Others | ||
*.DS_Store | ||
.idea/ | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
project_name: stompd | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
# you may remove this if you don't need go generate | ||
- go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: "{{ .ProjectName }}_checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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,2 @@ | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This is an example .goreleaser.yml file with some sensible defaults. | ||
# Make sure to check the documentation at https://goreleaser.com | ||
project_name: stomper | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
# you may remove this if you don't need go generate | ||
- go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
archives: | ||
- replacements: | ||
darwin: Darwin | ||
linux: Linux | ||
windows: Windows | ||
386: i386 | ||
amd64: x86_64 | ||
checksum: | ||
name_template: "{{ .ProjectName }}_checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |