diff --git a/.github/workflows/go-lint.yml b/.github/workflows/build.yml similarity index 57% rename from .github/workflows/go-lint.yml rename to .github/workflows/build.yml index e6ed1c77..ccc3afdf 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: go-lint +name: build on: push: tags: @@ -18,7 +18,20 @@ env: GOLANGCI_LINT_VERSION: v1.52.2 jobs: - lint: + spellcheck: + name: Spell Check + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v2 + + - name: Check spelling of Go files + uses: crate-ci/typos@master + with: + files: '*.go' + write_changes: true + + golangci-lint: name: Go Lint runs-on: ubuntu-latest timeout-minutes: 30 @@ -37,3 +50,18 @@ jobs: with: version: ${{ env.GOLANGCI_LINT_VERSION }} args: --timeout 5m + + test: + name: Go Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version-file: .go-version + check-latest: true + + - name: Test + run: go test -v ./... diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml deleted file mode 100644 index 5545607e..00000000 --- a/.github/workflows/go-release.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: go-release - -on: - push: - # run only against tags - tags: - - 'v*' - -permissions: - contents: write - # packages: write - # issues: write - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: actions/setup-go@v4 - with: - go-version-file: .go-version - # More assembly might be required: Docker logins, GPG, etc. It all depends - # on your needs. - - uses: goreleaser/goreleaser-action@v4 - with: - # either 'goreleaser' (default) or 'goreleaser-pro': - distribution: goreleaser - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' - # distribution: - # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml deleted file mode 100644 index fa749062..00000000 --- a/.github/workflows/go-test.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: go-test - -on: - push: - branches: [ "main" ] - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version-file: .go-version - check-latest: true - - - name: Test - run: go test -v ./...