Skip to content

Commit

Permalink
Merge branch 'fix-release' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Oct 14, 2019
2 parents 0d349d0 + c5d4eaf commit ff51740
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,30 @@
name: GoReleaser
on:
push:
tags:
- 'v*'
push:
tags:
- 'v*'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Check out code
uses: actions/checkout@v1
- name: Install dependency
run: |
go mod download
- name: Run Unit tests.
run: |
go test -race -short -covermode=atomic ./...
release:
name: Release
runs-on: ubuntu-latest
needs: [ test ]

steps:
- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.13
- name: Check out code
uses: actions/checkout@v1
- name: Login to dockerhub
uses: actions/docker/login@master
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: goreleaser
uses: docker://goreleaser/goreleaser
run: |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: release --rm-dist
if: success()

0 comments on commit ff51740

Please sign in to comment.