Skip to content

Commit 00fa49a

Browse files
author
Tomoya Usami
authored
Merge pull request #11 from alexbhr/master
Release Workflow Updates
2 parents 0938529 + 503e44d commit 00fa49a

File tree

6 files changed

+79
-13
lines changed

6 files changed

+79
-13
lines changed

.github/workflows/go-test.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on: [push, pull_request]
2+
name: Golang Tests
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.13.x, 1.14.x, 1.15.x]
8+
os: [ubuntu-latest, macos-latest, windows-latest]
9+
runs-on: ${{ matrix.os }}
10+
steps:
11+
- name: Install Go
12+
uses: actions/setup-go@v2
13+
with:
14+
go-version: ${{ matrix.go-version }}
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
- name: Grab deps
18+
run: |
19+
go get github.com/mattn/goveralls
20+
go get golang.org/x/tools/cmd/cover
21+
env:
22+
GO111MODULE: off
23+
- name: Grab modules
24+
run: go get ./...
25+
- name: Vet
26+
run: go vet ./...
27+
- name: Test
28+
run: go test -v -coverprofile=profilecov ./...
29+
- name: Send coverage
30+
uses: shogo82148/actions-goveralls@v1
31+
with:
32+
path-to-profile: profilecov
33+
flag-name: Go-${{ matrix.go }}
34+
parallel: true
35+
36+
finish:
37+
needs: test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: shogo82148/actions-goveralls@v1
41+
with:
42+
parallel-finished: true

.github/workflows/release.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This action triggers when new tags are pushed that look like semantic versioning (eg, v1.2.3)
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
name: Release Creation Task
8+
9+
jobs:
10+
release:
11+
name: Create Release
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 1
18+
19+
# This action runs Goreleaser with the GITHUB_TOKEN scoped to the current repo and job
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v2
22+
with:
23+
version: latest
24+
args: release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+

.goreleaser.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
project_name: hawk
2+
build:
3+
skip: true
4+
release:
5+
github:
6+
prerelease: auto

.travis.yml

-12
This file was deleted.

example_test.go example/example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"time"
77
)
88

9-
func ExampleClient_Head() {
9+
func ExampleClient_Header() {
1010
now := time.Date(2016, 5, 01, 9, 00, 00, 0, time.UTC)
1111

1212
c := &hawk.Client{

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/hiyosi/hawk
2+
3+
go 1.15

0 commit comments

Comments
 (0)