Skip to content

Commit

Permalink
Add goreleaser workflow on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
pomo-mondreganto committed Dec 17, 2020
1 parent 770adce commit 38d8880
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: release
on: push
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
Expand All @@ -21,5 +27,10 @@ jobs:
working-directory: front
run: yarn install && yarn build

- name: Release placeholder
run: ls front/dist
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_RELEASE_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.idea
/goxy
/goxy
/dist
39 changes: 39 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
before:
hooks:
- go mod tidy
- go mod download
builds:
- main: ./cmd/goxy
binary: goxy
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64

archives:
- format: zip
replacements:
darwin: Darwin
linux: Linux
windows: Windows
amd64: x86_64
files:
- README.md
- config.yml
- front/dist

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit 38d8880

Please sign in to comment.