Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to goreleaser v2 and Go v1.23 #1

Merged
merged 9 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
7 changes: 3 additions & 4 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 10 additions & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Check

on:
push:
branches:
- main
pull_request:
branches:
- '**'

Expand All @@ -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
Expand All @@ -38,24 +41,24 @@ 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
runs-on: ubuntu-latest
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
20 changes: 10 additions & 10 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}>
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
version: 2

release:
prerelease: auto

changelog:
skip: true
disable: true

signs:
- artifacts: checksum
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/makenew/gomodule

go 1.19
go 1.23