diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 405ec0b..2719bf8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,8 @@ -ARG VARIANT="1.19" +ARG VARIANT="1.23" FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT} -ARG GOLANGCI_LINT_VERSION="1.49.0" +ARG GOLANGCI_LINT_VERSION="1.61.0" RUN echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' \ | tee /etc/apt/sources.list.d/goreleaser.list diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6f3ca7f..9377ce8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,8 +3,8 @@ "build": { "dockerfile": "Dockerfile", "args": { - "VARIANT": "1.19", - "GOLANGCI_LINT_VERSION": "1.49.0" + "VARIANT": "1.23", + "GOLANGCI_LINT_VERSION": "1.61.0" } }, "extensions": [ diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 08e2f71..0425b5d 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -6,17 +6,16 @@ inputs: go_version: description: The Go version. required: false - default: '1.19' + default: '1.23' runs: using: composite steps: - name: Setup Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version: ${{ inputs.go_version }} - cache: true - name: Setup GoReleaser - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v6 with: install-only: true diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 56641f3..fce0a21 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,6 +3,9 @@ name: Check on: push: + branches: + - main + pull_request: branches: - '**' @@ -27,7 +30,7 @@ jobs: os_name: Windows steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup - name: Test @@ -38,13 +41,13 @@ jobs: timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup - name: Lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.49 + version: v1.61 args: --timeout 30m build: name: Build @@ -52,10 +55,10 @@ jobs: timeout-minutes: 60 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup uses: ./.github/actions/setup - name: Build - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v6 with: - args: release --skip-publish --skip-sign --snapshot --timeout=60m + args: release --skip=publish,sign --snapshot --timeout=60m diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 8be7915..133739c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -2,24 +2,24 @@ name: Format on: - pull_request: - branches: + push: + branches-ignore: - main workflow_dispatch: {} jobs: - fix: - name: Commit fixes + commit: + name: Format code runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} token: ${{ secrets.GH_TOKEN }} - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: git_user_signingkey: true git_commit_gpgsign: true @@ -30,15 +30,15 @@ jobs: - name: Setup uses: ./.github/actions/setup - name: Format - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - version: v1.49 + version: v1.61 args: --fix --timeout 30m - name: Commit - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 if: always() with: - commit_message: Run format + commit_message: 'ci: Format code' commit_user_name: ${{ secrets.GIT_USER_NAME }} commit_user_email: ${{ secrets.GIT_USER_EMAIL }} commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6fecbef..06aa854 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,9 +17,9 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 id: gpg with: git_user_signingkey: true @@ -31,7 +31,7 @@ jobs: - name: Setup uses: ./.github/actions/setup - name: Release - uses: goreleaser/goreleaser-action@v3 + uses: goreleaser/goreleaser-action@v6 with: args: release --timeout=60m env: diff --git a/.github/workflows/version.yml b/.github/workflows/version.yml index 802eb19..e397adc 100644 --- a/.github/workflows/version.yml +++ b/.github/workflows/version.yml @@ -17,11 +17,11 @@ jobs: timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.GH_TOKEN }} - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: git_user_signingkey: true git_commit_gpgsign: true diff --git a/.goreleaser.yml b/.goreleaser.yml index 7e9e45f..da6a640 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,9 +1,11 @@ --- +version: 2 + release: prerelease: auto changelog: - skip: true + disable: true signs: - artifacts: checksum diff --git a/go.mod b/go.mod index 35273e8..901e3a8 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/makenew/gomodule -go 1.19 +go 1.23