Browse Source

update github workflows

tags/v1.1.0
ojizero 1 year ago
parent
commit
8529638ee7
2 changed files with 25 additions and 14 deletions
  1. 1
    5
      .github/workflows/push.yml
  2. 24
    9
      .github/workflows/release.yml

+ 1
- 5
.github/workflows/push.yml View File

@@ -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"

+ 24
- 9
.github/workflows/release.yml View File

@@ -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 }}

Loading…
Cancel
Save