From 61e142dec47ba920c9d37748e45ecb99b75b1f2d Mon Sep 17 00:00:00 2001 From: Kirill Date: Wed, 24 Mar 2021 20:40:39 +0300 Subject: [PATCH] Updated goreleaser For #46 - updated goreleaser config and workflow action --- .github/workflows/release.yml | 40 ++++++----------------------------- .goreleaser.yml | 16 +++++++------- 2 files changed, 15 insertions(+), 41 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e86d064..daebab1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.goreleaser.yml b/.goreleaser.yml index 96aba4d..6c59747 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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: @@ -19,7 +19,7 @@ archives: 386: i386 amd64: x86_64 brews: - - github: + - tap: owner: g4s8 name: .tap commit_author: