Skip to content

Commit

Permalink
Merge pull request #71 from kamikazechaser/sohail/ci-builds
Browse files Browse the repository at this point in the history
ci: add build release feature
  • Loading branch information
jackc authored Oct 21, 2022
2 parents 4582d45 + 1430c92 commit dec6594
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: goreleaser

on:
push:
tags:
- "v*"

jobs:
goreleaser:
runs-on: ubuntu-latest
environment: build
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: --parallelism 1 --rm-dist --skip-validate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

15 changes: 15 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
main: ./
ldflags:
- -s -w

archives:
- format: tar.gz
files:
- LICENSE

0 comments on commit dec6594

Please sign in to comment.