Skip to content

Commit

Permalink
Merge pull request #7 from CMEPW/github-action
Browse files Browse the repository at this point in the history
[Feat] - add Github Action
  • Loading branch information
darkweak authored Oct 26, 2021
2 parents 83971d0 + 5a48fa9 commit b09d102
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build container and publish to docker hub

on:
create:
tags: ["v*"]

jobs:
generate-artifacts:
name: Generate cross-platform builds
runs-on: ubuntu-latest
steps:
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
workdir: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
before:
hooks:
- go mod download
builds:
- <<: &build_defaults
ldflags:
- -s -w
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- 386
- amd64
- arm
- arm64
archives:
-
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
-
goos: windows
format: zip

0 comments on commit b09d102

Please sign in to comment.