Skip to content

Commit

Permalink
Add releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuyoshi30 committed Feb 23, 2021
1 parent 8ecdd0b commit 030560d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: goreleaser

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
26 changes: 26 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
project_name: germanium

env:
- GO111MODULE=on

before:
hooks:
- go mod tidy

builds:
- main: .
binary: germanium
ldflags: -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}}

archives:
- replacements:
darwin: darwin
linux: linux
windows: windows
amd64: x86_64
files:
- LICENSE
- CREDITS

release:
prerelease: auto

0 comments on commit 030560d

Please sign in to comment.