From 83ab060820c40aa3ecc4cd8ce7730a503f8c0a30 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Mon, 5 Jul 2021 13:10:46 -0500 Subject: [PATCH 1/3] Create go.yml --- .github/workflows/go.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..a4021c0 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,25 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... From ae6ebd67d36b75190b9aab212c09bbfb8f59a5df Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Mon, 5 Jul 2021 13:48:19 -0500 Subject: [PATCH 2/3] add goreleaser action --- .github/workflows/go.yml | 25 ------------------------- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index a4021c0..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Go - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7a0f37f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - uses: goreleaser/goreleaser-action@v2.6.1 + with: + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..458a9a0 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-go@v2 + with: + go-version: 1.16 + + - name: Build + run: go build + + - name: Test + run: go test -v ./... + From 109d25ac5d554ebfbafce2e958a853a63abf0358 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Mon, 5 Jul 2021 13:54:54 -0500 Subject: [PATCH 3/3] test every os --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 458a9a0..2575953 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,10 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2