From 80eb5c2de14674ef5d3c03e1a1b5bc2781cc6c27 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Tue, 24 Oct 2023 09:56:25 +0900 Subject: [PATCH 1/5] update yaml package --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8f9fb66..fcd1b07 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( golang.org/x/crypto v0.14.0 golang.org/x/net v0.17.0 - gopkg.in/yaml.v2 v2.2.8 + gopkg.in/yaml.v2 v2.4.0 ) require ( diff --git a/go.sum b/go.sum index c25327b..ac4953f 100644 --- a/go.sum +++ b/go.sum @@ -9,5 +9,5 @@ golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= From ec5ec09518c7bc7c6d2d711c5a4ae3ae2e81f16d Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Tue, 24 Oct 2023 11:39:26 +0900 Subject: [PATCH 2/5] use github actions --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------------- 2 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7f89978 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: 1.21 + + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Use cache + uses: actions/cache@v3 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + + - name: Download Modules + if: steps.cache.outputs.cache-hit != 'true' + run: go mod download + + - name: Build + run: | + go build -o gohakai ./... + rm gohakai diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dd2aadc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: go -sudo: false - -matrix: - include: - - go: 1.9 - - go: "1.13" - - go: tip - -install: - - make update-module - - go get -u -v golang.org/x/tools/cmd/goimports - -before_script: - - goimports -d . - - gofmt -l . - -script: - - go build -v . - -notifications: - email: false From e3a2ad3453e0a1357b2d3e120dcfb0f96ef5c2bc Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Tue, 24 Oct 2023 11:39:41 +0900 Subject: [PATCH 3/5] use go1.21 --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e44cfd..85d6492 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,15 +11,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Unshallow run: git fetch --prune --unshallow - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: 1.21 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 From 2eff2e1c294ec96c1bc713df23965fc2db90ade0 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Tue, 24 Oct 2023 11:43:06 +0900 Subject: [PATCH 4/5] checkout before setup-go --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f89978..30381cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,14 +10,14 @@ jobs: build: runs-on: ubuntu-latest steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go uses: actions/setup-go@v4 with: go-version: 1.21 - - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - name: Use cache uses: actions/cache@v3 with: From fbb2dea5786a2a4877f273dc69609d2e4f932648 Mon Sep 17 00:00:00 2001 From: Hideo Hattori Date: Tue, 24 Oct 2023 11:46:26 +0900 Subject: [PATCH 5/5] update badge --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 33f244a..c75c55c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -## gohakai - -[![Travis Build Status](https://travis-ci.org/KLab/gohakai.svg?branch=master)](https://travis-ci.org/KLab/gohakai) +## gohakai [![CI](https://github.com/KLab/gohakai/actions/workflows/ci.yml/badge.svg)](https://github.com/KLab/gohakai/actions/workflows/ci.yml) Internet hakai with Go.