From e856543529844f77e69abcb27c301b63a3135d0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=94=E7=84=B0=E9=98=B3?= <346765799@qq.com> Date: Thu, 6 Nov 2025 15:50:06 +0800 Subject: [PATCH] Simplify release workflow by removing setup-go step Removed setup-go step as Go environment is provided by the container image. --- .github/workflows/release.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c9e5b2..6d514e7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,15 +14,18 @@ permissions: jobs: build: + # runs-on指定了运行作业的虚拟机环境类型 + # 即使使用container,runs-on仍然是必要的配置 runs-on: ubuntu-latest + # 在runner上运行golang容器 + container: + # 使用最新版本的golang镜像,无需指定具体版本号 + image: golang:latest-alpine steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Go - uses: actions/setup-go@v5 - with: - go-version: '1.24.x' + # Go environment is already provided by the container image - name: Install gf CLI run: | @@ -47,10 +50,16 @@ jobs: release: needs: build + # runs-on指定了运行作业的虚拟机环境类型 + # 即使使用container,runs-on仍然是必要的配置 runs-on: ubuntu-latest + # 在runner上运行golang容器 + container: + # 使用最新版本的golang镜像,无需指定具体版本号 + image: golang:latest-alpine steps: - name: Checkout - uses: actions/checkout@ + uses: actions/checkout@v4 - name: Download artifacts uses: actions/download-artifact@v3