Skip to content

Commit

Permalink
update github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ojizero committed Apr 6, 2020
1 parent 5f98ec0 commit 8529638
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/push.yml
Expand Up @@ -18,14 +18,10 @@ jobs:
id: go

- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Get dependencies
run: go mod download

- name: Tests
run: go test

# - name: Version bump
# if: github.ref == "master"
# run: "automatically bump the version here"
33 changes: 24 additions & 9 deletions .github/workflows/release.yml
@@ -1,20 +1,35 @@
name: Create new Github release
name: Create new release
on:
push:
tags:
- v*
jobs:
release:
name: Release
release-binary:
name: Release binary
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Check out code
uses: actions/checkout@v1
uses: actions/checkout@v2

# The unshallow step is required for GoReleaser's
# changelog generation to work correctly.
- name: Unshallow
run: git fetch --prune --unshallow

- name: Release new version
uses: actions/create-release@v1
- name: Get dependencies
run: |
go mod download
go get github.com/mitchellh/gox
- name: Run release
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

0 comments on commit 8529638

Please sign in to comment.