Skip to content

Commit

Permalink
Updated goreleaser
Browse files Browse the repository at this point in the history
For #46 - updated goreleaser config and workflow action
  • Loading branch information
g4s8 committed Mar 24, 2021
1 parent 14dfe96 commit 61e142d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 41 deletions.
40 changes: 7 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,19 @@
# MIT License
#
# Copyright (c) 2019 g4s8
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights * to use, copy, modify,
# merge, publish, distribute, sublicense, and/or sell copies of the Software,
# and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
---
name: gorelease
"on":
push:
tags:
- '*'
tags: ['*']
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
- uses: actions/checkout@v2
with:
go-version: 1.13.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: 1.15
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
Expand Down
16 changes: 8 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ before:
hooks:
- go mod download
builds:
-
main: ./cmd/gitstrap/main.go
# ldflags:
# - -s -w
# -X "main.buildDate={{.Date}}"
# -X "main.buildVersion={{.Env.TRAVIS_TAG}}{{.Env.TRAVIS_BUILD_NUMBER}}"
# -X "main.buildCommit={{.Env.TRAVIS_COMMIT}}"
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
main: ./cmd/gitstrap/
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}'
replacements:
Expand All @@ -19,7 +19,7 @@ archives:
386: i386
amd64: x86_64
brews:
- github:
- tap:
owner: g4s8
name: .tap
commit_author:
Expand Down

0 comments on commit 61e142d

Please sign in to comment.