From c92f9379e46aaf01280eb71bd571745e4d51ab9d Mon Sep 17 00:00:00 2001 From: Shai Nagar Date: Tue, 21 Sep 2021 18:52:13 +0300 Subject: [PATCH] workflow adjustments (#153) * added goreleaser workflow * re-enabled coverage --- .github/workflows/go-releaser.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/go.yml | 21 +++++++++++---------- 2 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/go-releaser.yml diff --git a/.github/workflows/go-releaser.yml b/.github/workflows/go-releaser.yml new file mode 100644 index 0000000..a499515 --- /dev/null +++ b/.github/workflows/go-releaser.yml @@ -0,0 +1,29 @@ +name: GoReleaser + +on: + release: + types: + - created +jobs: + goreleaser: + runs-on: ubuntu-latest + 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: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 047eb95..6bf00e0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,4 +1,4 @@ -name: Go +name: CI on: push: @@ -17,17 +17,18 @@ jobs: with: go-version: 1.17 + - name: Build + run: make lint build + - name: Test run: | go test -v -covermode=count -coverprofile=coverage.out ./... -# - name: Coverage -# uses: jandelgado/gcov2lcov-action@v1.0.6 -# - name: Coveralls -# uses: coverallsapp/github-action@v1.1.2 -# with: -# github-token: ${{ secrets.github_token }} -# path-to-lcov: coverage.lcov + - name: Coverage + uses: jandelgado/gcov2lcov-action@v1.0.8 - - name: Build - run: make lint build + - name: Coveralls + uses: coverallsapp/github-action@v1.1.2 + with: + github-token: ${{ secrets.github_token }} + path-to-lcov: coverage.lcov