feat: v0.12.5 —— Release 自动发布,Gitea 上所有 job 直接跳过
安装包 / Linux aarch64 (push) Canceled after 0s
安装包 / Linux x86_64 (push) Canceled after 0s
安装包 / Windows x86_64 (push) Canceled after 0s
安装包 / macOS arm64 (Apple Silicon) (push) Canceled after 0s
安装包 / macOS x86_64 (Intel) (push) Canceled after 0s
安装包 / 发布到 Release (push) Canceled after 0s
安装包 / Linux aarch64 (push) Canceled after 0s
安装包 / Linux x86_64 (push) Canceled after 0s
安装包 / Windows x86_64 (push) Canceled after 0s
安装包 / macOS arm64 (Apple Silicon) (push) Canceled after 0s
安装包 / macOS x86_64 (Intel) (push) Canceled after 0s
安装包 / 发布到 Release (push) Canceled after 0s
- 取消手动 publish 勾选:推 main / 打 tag / 手动 Run workflow 都会自动发 Release (PR 不发),仍然是 draft:false + Latest - 每个 job 加 github.server_url == 'https://github.com' 守卫: Gitea 里跑的 run 所有 job 都显示 skipped,不占 runner、不会发 Release - cancel-in-progress 改成 false,避免发布到一半被新 push 取消 - README 更新:自动发版说明 + Gitea 1.27 的三种关法(设置页/Actions 页/API)
This commit is contained in:
@@ -210,13 +210,23 @@ make -C build install INSTALL_ROOT=/tmp/pkg # 打包用,装到 /tmp/pkg/usr/lo
|
||||
`.github/workflows/packages.yml` 是给 GitHub 镜像用的:推代码、打 tag、PR 或手动运行时编译,
|
||||
并打出下面这些安装包。
|
||||
|
||||
> **Gitea 也会读这个目录**:Gitea Actions 兼容 GitHub,默认同时扫描 `.gitea/workflows` 和
|
||||
> `.github/workflows`,光靠 YAML 没法让 Gitea 忽略它。要它不在 Gitea 跑,三选一:
|
||||
>
|
||||
> - 仓库 **设置 → 高级设置** 里取消「启用 Actions」:整个仓库的 Actions 都停,GitHub 不受影响
|
||||
> - 或 **Actions → 安装包 → 禁用工作流**:只停这一个(Gitea 1.22+)
|
||||
> - 或服务器 `app.ini` 里设 `[actions] WORKFLOW_DIRS = .gitea/workflows`:Gitea 只读
|
||||
> `.gitea/workflows`,`.github/workflows` 就只对 GitHub 生效(需要支持该配置的版本)
|
||||
**Gitea 也会读这个目录**:Gitea Actions 兼容 GitHub,默认同时扫描 `.gitea/workflows` 和
|
||||
`.github/workflows`。工作流里每个 job 都加了 `github.server_url == 'https://github.com'` 的守卫,
|
||||
在 Gitea 上只会显示 skipped、不占 runner;要连 Actions 列表里的 run 都不出现,任选一个:
|
||||
|
||||
- 仓库 **设置 → Actions → General**,取消勾选 **Enable Actions** 后保存(整个仓库的 Actions 全停)
|
||||
- 或 **Actions → 安装包** 页面点 **Disable Workflow**(只停这一个工作流)
|
||||
- 或服务器 `app.ini` 里设 `[actions] WORKFLOW_DIRS = .gitea/workflows`,Gitea 就只读
|
||||
`.gitea/workflows`,`.github/workflows` 只对 GitHub 生效
|
||||
|
||||
Gitea 1.27 也可以直接调 API(`TOKEN` 换成你的访问令牌,`<id>` 用列表里返回的值):
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: token $TOKEN" \
|
||||
https://git.linuxacme.com/api/v1/repos/liyepan/VoiletMark/actions/workflows
|
||||
curl -X PUT -H "Authorization: token $TOKEN" \
|
||||
https://git.linuxacme.com/api/v1/repos/liyepan/VoiletMark/actions/workflows/<id>/disable
|
||||
```
|
||||
|
||||
| 平台 | runner | 产物 |
|
||||
| --- | --- | --- |
|
||||
@@ -239,9 +249,10 @@ make -C build install INSTALL_ROOT=/tmp/pkg # 打包用,装到 /tmp/pkg/usr/lo
|
||||
|
||||
### 发 Release
|
||||
|
||||
- 打 tag:`git tag v0.12.5 && git push origin v0.12.4`(同步到 GitHub 时把 tag 一起推过去)
|
||||
- 不打 tag:**Actions → 安装包 → Run workflow**,勾上 **publish**,会用 `v<版本>` 当 tag
|
||||
- 普通推送 / PR 只上传 artifact,不发 Release——「发布到 Release」显示 skipped 是正常的
|
||||
- 推 main、打 tag、手动 Run workflow 都会**自动发 Release**(PR 不发)
|
||||
- tag 用 `v<版本>`,版本号在 `VoiletMark.pro` 的 `VERSION` 里;同一版本多次推送会更新同一个 Release 的安装包
|
||||
- 想发新版本就改 `VERSION`,下一次推送会自动建 `v<新版本>` 的 Release
|
||||
- Release 是正式发布(不是草稿 / 预发布),并设为 Latest
|
||||
|
||||
### 本地打包(Linux)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user