Skip to content

Commit

Permalink
feat(ci): add release ci and gorelease config
Browse files Browse the repository at this point in the history
  • Loading branch information
miltlima committed Sep 18, 2023
1 parent ea0c605 commit b74ecf7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: 'release packages'
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
go.work

# Vscode workspace file and directory
.vscode
.vscode
dist/
25 changes: 25 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

builds:
- binary: lookr
env:
- CG0_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
- arm
ldflags: -s -w

checksum:
name_template: 'checksums.txt'

archives:
- format: binary
format_overrides:
- goos: windows
format: zip

0 comments on commit b74ecf7

Please sign in to comment.