diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4860423..87bf3a2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -8,28 +8,49 @@ on: - main pull_request: -jobs: +permissions: + contents: write + issues: write + packages: write + pull-requests: read +jobs: build: name: Build runs-on: ubuntu-latest steps: - name: Set up Go 1.17 - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: '^1.17' id: go + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Check out code into the Go module directory uses: actions/checkout@v3 with: lfs: true + fetch-depth: 0 - name: Install Task uses: arduino/setup-task@v1 + + - name: Download assets + run: task download-assets + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest - name: Build & test - run: task download-assets test + run: task test - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index c4a9417..0000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: golangci-lint -on: - push: - tags: - - v* - branches: - - main - pull_request: -permissions: - contents: read - pull-requests: read -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - name: Set up Go 1.17 - uses: actions/setup-go@v2 - - uses: actions/checkout@v2 - - name: Install Task - uses: arduino/setup-task@v1 - - name: Download assets - run: task download-assets - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: latest - - # Optional: working directory, useful for monorepos - # working-directory: somedir - - # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 - - # Optional: show only new issues if it's a pull request. The default value is `false`. - # only-new-issues: true - - # Optional: if set to true then the action will use pre-installed Go. - # skip-go-installation: true - - # Optional: if set to true then the action don't cache or restore ~/go/pkg. - # skip-pkg-cache: true - - # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. - # skip-build-cache: true \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml index 7ff7cf7..b819a03 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -21,6 +21,12 @@ builds: goarch: arm goarm: '7' +release: + github: + owner: baez90 + name: goveal + mode: replace + dockers: - id: goveal goos: linux diff --git a/Taskfile.yml b/Taskfile.yml index 9a9bc46..9e848cb 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -40,7 +40,7 @@ tasks: - go.sum cmds: - go mod download - - go mod tidy + - go mod tidy -compat=1.17 test: sources: