diff --git a/README.md b/README.md index a80cc46..59cce8b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ import _ "github.com/bool64/dev" // Include development helpers to project. Add `Makefile` to your module with includes standard targets. ```Makefile -#GOLANGCI_LINT_VERSION := "v2.5.0" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v2.11.3" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/makefiles/base.mk b/makefiles/base.mk index 2673221..47a73ec 100644 --- a/makefiles/base.mk +++ b/makefiles/base.mk @@ -1,4 +1,4 @@ -#GOLANGCI_LINT_VERSION := "v2.5.0" # Optional configuration to pinpoint golangci-lint version. +#GOLANGCI_LINT_VERSION := "v2.11.3" # Optional configuration to pinpoint golangci-lint version. # The head of Makefile determines location of dev-go to include standard targets. GO ?= go diff --git a/scripts/lint.sh b/scripts/lint.sh index 2fe72d2..5608e98 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash [ -z "$GO" ] && GO=go -[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v2.5.0" +[ -z "$GOLANGCI_LINT_VERSION" ] && GOLANGCI_LINT_VERSION="v2.11.3" # detecting GOPATH and removing trailing "/" if any GOPATH="$(go env GOPATH)" diff --git a/templates/github/workflows/golangci-lint.yml b/templates/github/workflows/golangci-lint.yml index f435fe8..34c9ed4 100644 --- a/templates/github/workflows/golangci-lint.yml +++ b/templates/github/workflows/golangci-lint.yml @@ -24,25 +24,6 @@ jobs: go-version: stable - uses: actions/checkout@v4 - name: golangci-lint - uses: golangci/golangci-lint-action@v8.0.0 + uses: golangci/golangci-lint-action@v9.2.0 with: - # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. - version: v2.4.0 - - # 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 + version: v2.11.3 diff --git a/templates/github/workflows/release-assets.yml b/templates/github/workflows/release-assets.yml index 6a3e1b9..9cee931 100644 --- a/templates/github/workflows/release-assets.yml +++ b/templates/github/workflows/release-assets.yml @@ -6,6 +6,10 @@ on: release: types: - created + +permissions: + contents: write # Required to upload assets + env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GO_VERSION: stable @@ -23,60 +27,31 @@ jobs: - name: Build artifacts run: | make release-assets + - name: Upload linux_amd64.tar.gz if: hashFiles('linux_amd64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_amd64.tar.gz - asset_name: linux_amd64.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" linux_amd64.tar.gz --clobber + - name: Upload linux_amd64_dbg.tar.gz if: hashFiles('linux_amd64_dbg.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_amd64_dbg.tar.gz - asset_name: linux_amd64_dbg.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" linux_amd64_dbg.tar.gz --clobber + - name: Upload linux_arm64.tar.gz if: hashFiles('linux_arm64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_arm64.tar.gz - asset_name: linux_arm64.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" linux_arm64.tar.gz --clobber + - name: Upload linux_arm.tar.gz if: hashFiles('linux_arm.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./linux_arm.tar.gz - asset_name: linux_arm.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" linux_arm.tar.gz --clobber + - name: Upload darwin_amd64.tar.gz if: hashFiles('darwin_amd64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./darwin_amd64.tar.gz - asset_name: darwin_amd64.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" darwin_amd64.tar.gz --clobber + - name: Upload darwin_arm64.tar.gz if: hashFiles('darwin_arm64.tar.gz') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./darwin_arm64.tar.gz - asset_name: darwin_arm64.tar.gz - asset_content_type: application/tar+gzip + run: gh release upload "${{ github.event.release.tag_name }}" darwin_arm64.tar.gz --clobber + - name: Upload windows_amd64.zip if: hashFiles('windows_amd64.zip') != '' - uses: actions/upload-release-asset@v1 - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./windows_amd64.zip - asset_name: windows_amd64.zip - asset_content_type: application/zip - + run: gh release upload "${{ github.event.release.tag_name }}" windows_amd64.zip --clobber