Skip to content

chore: upgrade Go to 1.23 and update GitHub Actions#39

Merged
phodal merged 2 commits into
masterfrom
chore/upgrade-go-infra
Nov 29, 2025
Merged

chore: upgrade Go to 1.23 and update GitHub Actions#39
phodal merged 2 commits into
masterfrom
chore/upgrade-go-infra

Conversation

@phodal
Copy link
Copy Markdown
Owner

@phodal phodal commented Nov 29, 2025

Summary

Upgrade Go infrastructure to latest versions.

Changes

Go Version

  • Upgrade Go version from 1.18 to 1.23
  • Run go mod tidy to clean up dependencies
  • antlr4 moved from indirect to direct dependency

GitHub Actions (Requires manual update due to OAuth permissions)

The following workflow updates need to be applied manually or via GitHub web UI:

.github/workflows/go.yml:

name: Build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Check out code into the Go module directory
      uses: actions/checkout@v4

    - name: Set up Go
      uses: actions/setup-go@v5
      with:
        go-version: '1.23'

    - name: Setup Graphviz
      uses: ts-graphviz/setup-graphviz@v2

    - name: Build
      run: go build -v ./...

    - name: Test
      run: go test -v ./...

.github/workflows/release.yml:

name: Release

on:
  push:
    tags:
      - '*'

jobs:

  build:
    name: Build
    runs-on: ubuntu-latest
    steps:

    - name: Check out code into the Go module directory
      uses: actions/checkout@v4

    - name: Set up Go
      uses: actions/setup-go@v5
      with:
        go-version: '1.23'

    - name: Build
      run: go build -v .

    - name: Test
      run: go test -v .

    - name: Release
      run: make build

    - name: upload GNU/Linux coca to release
      uses: svenstaro/upload-release-action@v2
      with:
        repo_token: ${{ secrets.GITHUB_TOKEN }}
        file: output/coca_linux
        asset_name: coca_linux
        tag: ${{ github.ref }}

    - name: upload macOS coca to release
      uses: svenstaro/upload-release-action@v2
      with:
        repo_token: ${{ secrets.GITHUB_TOKEN }}
        file: output/coca_macos
        asset_name: coca_macos
        tag: ${{ github.ref }}

    - name: upload Windows coca to release
      uses: svenstaro/upload-release-action@v2
      with:
        repo_token: ${{ secrets.GITHUB_TOKEN }}
        file: output/coca_windows.exe
        asset_name: coca_windows.exe
        tag: ${{ github.ref }}

Key Updates

  • actions/checkout v2 → v4
  • actions/setup-go v2 → v5
  • ts-graphviz/setup-graphviz v1 → v2
  • svenstaro/upload-release-action v1-release → v2
  • Removed deprecated dep support

Testing

  • ✅ Build passes: go build -v ./...
  • ✅ Tests pass: go test ./...

Pull Request opened by Augment Code with guidance from the PR author

- Upgrade Go version from 1.18 to 1.23
- Run go mod tidy to clean up dependencies
- antlr4 moved from indirect to direct dependency
@phodal
Copy link
Copy Markdown
Owner Author

phodal commented Nov 29, 2025

@copilot 根据 issue 中的描述,更新一下 build,避免构建失败

Copy link
Copy Markdown

Copilot AI commented Nov 29, 2025

@phodal I've opened a new pull request, #40, to work on those changes. Once the pull request is ready, I'll request review from you.

The TestNewTodoApp test was checking for a specific author name 'Phodal Huang'
from git history. In CI environments with shallow clone (depth=1), the git
history may not contain the expected author. Changed the assertion to only
verify that the author field is not empty.
@phodal phodal merged commit 9950c2d into master Nov 29, 2025
1 check passed
@phodal
Copy link
Copy Markdown
Owner Author

phodal commented Nov 29, 2025

@copilot 根据 PR 中的描述,更新一下 workflow,避免构建失败

phodal added a commit that referenced this pull request Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants