Skip to content

ci: 用 go-version-file 读取 go.mod 版本,修复工具链不匹配 #1

ci: 用 go-version-file 读取 go.mod 版本,修复工具链不匹配

ci: 用 go-version-file 读取 go.mod 版本,修复工具链不匹配 #1

Workflow file for this run

name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
# 从 go.mod 读取版本,避免与 go 指令漂移。
go-version-file: go.mod
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}