Skip to content

Commit

Permalink
update go version
Browse files Browse the repository at this point in the history
  • Loading branch information
shibumi committed Oct 31, 2021
1 parent 29926a2 commit 2fdeb49
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 29 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/build.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: release
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [ 1.16.x, 1.17.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Format Unix
run: test -z $(go fmt ./...)
- name: Test
run: go test -covermode atomic -coverprofile='profile.cov' ./...
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
release:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: 'v0.180.2'
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
project_name: mnemonic
builds:
- ldflags:
- "-s -w"
- "-extldflags=-zrelro"
- "-extldflags=-znow"
- "-X main.version={{.Version}}"
- "-X main.commit={{.FullCommit}}"
- "-X main.date={{.CommitDate}}"
env:
- "CGO_ENABLED=0"
- "GO111MODULE=on"
- "GOFLAGS=-mod=readonly -trimpath"
goos:
- linux
goarch:
- amd64
main: .
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/shibumi/mnemonic

go 1.14
go 1.17

0 comments on commit 2fdeb49

Please sign in to comment.