Skip to content

Commit

Permalink
#42 - actions release
Browse files Browse the repository at this point in the history
  • Loading branch information
g4s8 committed Feb 7, 2020
1 parent 0ea2309 commit 901069a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
39 changes: 24 additions & 15 deletions .travis.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
---
language: go
go:
- 1.12.x
env:
GO111MODULE: "on"
script:
- go build
- go build ./cmd/gitstrap
- go test
deploy:
- provider: script
skip_cleanup: true
script: curl -sL https://git.io/goreleaser | bash
"on":
tags: true
name: gorelease
"on":
push:
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
with:
go-version: 1.13.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }}
7 changes: 3 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
builds:
-
main: ./cmd/gitstrap/main.go
env:
- CGO_ENABLED=0
ldflags:
- -s -w
-X "main.buildDate={{.Date}}"
Expand Down Expand Up @@ -34,5 +33,5 @@ changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^docs:'
- '^test:'

0 comments on commit 901069a

Please sign in to comment.