Merge pull request #162 from itmisx/fix/input-queue #122
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release | |
| # 触发条件:推一个 vX.Y.Z 形式的 tag。 | |
| # | |
| # 标准发布流程: | |
| # git tag v0.1.0 | |
| # git push origin v0.1.0 | |
| # | |
| # 推完 tag 后,本 workflow 自动: | |
| # 1. checkout | |
| # 2. 装 Go 1.25 | |
| # 3. 跑 goreleaser:5 平台 cross-compile + 打 tar.gz/zip + 生成 changelog + 发 GitHub Release | |
| # | |
| # 不需要任何额外 secret,GITHUB_TOKEN 由 Actions 自动注入。 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write # 发 Release 需要 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| # goreleaser 算 changelog 需要完整 git 历史 | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25" | |
| cache: true | |
| - name: Run goreleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Gitee 发行版不在这里发:境外 GitHub runner 往 Gitee 上传大文件会被限速/卡死。 | |
| # 改由 Gitee Go(国内 runner)在收到 mirror 推来的 tag 后跑 scripts/gitee-release.sh | |
| # 构建+上传(全程国内)。详见该脚本头注释。 |