From ae47d32e87c019ad27f86f15d45e4239be563d1a Mon Sep 17 00:00:00 2001 From: kscarlett Date: Sat, 1 Feb 2020 02:37:32 +0000 Subject: [PATCH 1/3] build: remove TravisCI --- .travis.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 47eff5c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: go -sudo: false -matrix: - include: - - go: 1.x - -before_install: - - go get -t -v ./... # move to go mod soon - - go get github.com/mattn/goveralls - -script: - - $GOPATH/bin/goveralls -service=travis-ci - -# calls goreleaser -deploy: -- provider: script - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash - on: - tags: true - condition: $TRAVIS_OS_NAME = linux AND $TRAVIS_BRANCH = master \ No newline at end of file From 1350b9488603a78e546a18e89641402483452235 Mon Sep 17 00:00:00 2001 From: kscarlett Date: Sat, 1 Feb 2020 03:12:17 +0000 Subject: [PATCH 2/3] build: add extra changelog exclusion --- .goreleaser.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.goreleaser.yml b/.goreleaser.yml index 81d2425..fa871d4 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -107,4 +107,5 @@ changelog: - "^docs:" - "^test:" - "^build:" + - "^cleanup:" - typo" From 28f198ef6adefe56db30b6b0056bce5504edd3b0 Mon Sep 17 00:00:00 2001 From: kscarlett Date: Sat, 1 Feb 2020 03:23:54 +0000 Subject: [PATCH 3/3] build: add workflows --- .github/pr-type-labeler.yml | 6 +++++ .github/workflows/go-ci.yml | 18 +++++++++++++++ .github/workflows/go-linting.yml | 14 +++++++++++ .github/workflows/go-release.yml | 27 ++++++++++++++++++++++ .github/workflows/reviewdog-shellcheck.yml | 16 +++++++++++++ .github/workflows/size-label.yml | 10 ++++++++ .github/workflows/type-label.yml | 14 +++++++++++ 7 files changed, 105 insertions(+) create mode 100644 .github/pr-type-labeler.yml create mode 100644 .github/workflows/go-ci.yml create mode 100644 .github/workflows/go-linting.yml create mode 100644 .github/workflows/go-release.yml create mode 100644 .github/workflows/reviewdog-shellcheck.yml create mode 100644 .github/workflows/size-label.yml create mode 100644 .github/workflows/type-label.yml diff --git a/.github/pr-type-labeler.yml b/.github/pr-type-labeler.yml new file mode 100644 index 0000000..6b08c0f --- /dev/null +++ b/.github/pr-type-labeler.yml @@ -0,0 +1,6 @@ +kind/bug: ["fix/*", "bug/*"] +kind/cleanup: ["cleanup/*", "chore/*"] +kind/feature: ["feature/*", "feat/*"] +kind/documentation: ["documentation/*", "docs/*"] +kind/design: design/* +kind/api-change: ["*breaking*"] diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml new file mode 100644 index 0000000..c86a96a --- /dev/null +++ b/.github/workflows/go-ci.yml @@ -0,0 +1,18 @@ +on: [push, pull_request] +name: go-ci +jobs: + test: + strategy: + matrix: + go-version: [1.13.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Test + run: go test ./... diff --git a/.github/workflows/go-linting.yml b/.github/workflows/go-linting.yml new file mode 100644 index 0000000..0bbe541 --- /dev/null +++ b/.github/workflows/go-linting.yml @@ -0,0 +1,14 @@ +name: reviewdog-go +on: [pull_request] +jobs: + golangci-lint: + name: runner / golangci-lint + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + - name: golangci-lint + uses: reviewdog/action-golangci-lint@v1 + with: + github_token: ${{ secrets.github_token }} + golangci_lint_flags: "--enable-all --exclude-use-default=false" diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml new file mode 100644 index 0000000..e4bd177 --- /dev/null +++ b/.github/workflows/go-release.yml @@ -0,0 +1,27 @@ +name: goreleaser + +on: + push: + tags: + - "*" + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/reviewdog-shellcheck.yml b/.github/workflows/reviewdog-shellcheck.yml new file mode 100644 index 0000000..71fcf8a --- /dev/null +++ b/.github/workflows/reviewdog-shellcheck.yml @@ -0,0 +1,16 @@ +# For helper scripts +name: reviewdog-sh +on: [pull_request] +jobs: + shellcheck: + name: runner / shellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: shellcheck + uses: reviewdog/action-shellcheck@v1 + with: + github_token: ${{ secrets.github_token }} + reporter: github-pr-review + pattern: "*.sh" # Optional. + exclude: "./.git/*" diff --git a/.github/workflows/size-label.yml b/.github/workflows/size-label.yml new file mode 100644 index 0000000..25f3519 --- /dev/null +++ b/.github/workflows/size-label.yml @@ -0,0 +1,10 @@ +name: size-label +on: pull_request +jobs: + size-label: + runs-on: ubuntu-latest + steps: + - name: size-label + uses: "pascalgn/size-label-action@d909487e1a0057d85c638f1ddefdb315a63d2e98" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/type-label.yml b/.github/workflows/type-label.yml new file mode 100644 index 0000000..ecee3aa --- /dev/null +++ b/.github/workflows/type-label.yml @@ -0,0 +1,14 @@ +name: type-label +on: + pull_request: + types: [opened] + +jobs: + pr-labeler: + runs-on: ubuntu-latest + steps: + - uses: TimonVS/pr-labeler-action@v3 + with: + configuration-path: .github/pr-type-labeler.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}