Skip to content

Commit

Permalink
github: add goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
muraty committed Jan 28, 2025
1 parent 4df38c8 commit 6ae4a2d
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 10 deletions.
29 changes: 19 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,26 @@ name: release
on:
release:
types:
- published

- created
jobs:
release:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and copy binary
run: make build-docker
- name: Upload binary to release
uses: softprops/action-gh-release@v1
if: ${{startsWith(github.ref, 'refs/tags/') }}
-
name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.1
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
files: ./bin/efes
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2

before:
hooks:
- go mod download

builds:
- env:
- CGO_ENABLED=0
main: main.go
goos:
- linux
goarch:
- amd64
archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 6ae4a2d

Please sign in to comment.