diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..71f4b22 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [motemen, Songmu] diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..01311c1 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: setup go + uses: actions/setup-go@v1 + with: + go-version: 1.x + - name: checkout + uses: actions/checkout@v1 + - name: release + env: + GITHUB_TOKEN: ${{ secrets.github_token }} + run: | + export GOBIN=$(pwd)/bin + PATH=$GOBIN:$PATH make crossbuild upload diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..1a1ead9 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,46 @@ +name: test +on: + push: + branches: + - "**" + pull_request: {} +jobs: + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - macOS-latest + - windows-latest + steps: + - name: setup go + uses: actions/setup-go@v1 + with: + go-version: 1.x + - name: checkout + uses: actions/checkout@v1 + - name: lint + run: | + GO111MODULE=off GOBIN=$(pwd)/bin go get golang.org/x/lint/golint + bin/golint -set_exit_status ./... + if: "matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'" + - name: test + run: go test -coverprofile coverage.out -covermode atomic ./... + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + github-token: ${{ secrets.github_token }} + path-to-profile: coverage.out + parallel: true + job-number: ${{ strategy.job-index }} + finish: + runs-on: ubuntu-latest + needs: test + steps: + - name: finish coverage report + uses: shogo82148/actions-goveralls@v1 + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true