ci(release): publish Linux binaries images and demo in one workflow

This commit is contained in:
eezd committed 2026-10-27 14:15:57 +08:00
1 parent 4645d3d11c
commit 9eac06bd47
10 files changed
+407 -12

No files matched your search

+16 -1
View File
@@ -4,7 +4,7 @@
[Project home](../README.md) · [User guide](guide.md) · [Development guide](development.md)
RawMark embeds the frontend in its Go service and uses SQLite and the filesystem at runtime. No separate database service is needed. Docker images are currently built from source; the commands below do not depend on a prepublished image registry.
RawMark embeds the frontend in its Go service and uses SQLite and the filesystem at runtime. No separate database service is needed. You can use a release image or build from source; the source-build commands below remain available.
## Docker quick start
@@ -52,6 +52,21 @@ This configuration publishes port **21000** on all network interfaces by default
Do not point the quick-start container and a Compose instance at the same database or vault concurrently. Stop the old instance, back up, and verify data locations before switching deployment methods.
## Prebuilt images and native programs
Release images are available as `ghcr.io/eezd/rawmark:0.1.0` for Linux amd64 and arm64. Replace `rawmark` in the Docker commands above with that image name to skip source builds. `latest` follows the latest stable release; use a version tag for controlled upgrades. The repository Compose file continues to support source builds.
Native Linux archives and `SHA256SUMS` are available on the [Releases page](https://github.com/eezd/RawMark/releases). Download the archive matching your architecture and verify its checksum before extracting it:
```sh
sha256sum --ignore-missing --check SHA256SUMS
tar -xzf rawmark_0.1.0_linux_amd64.tar.gz
./rawmark --version
RAWMARK_DATA="$HOME/rawmark-data" RAWMARK_ADDR=127.0.0.1:21000 ./rawmark
```
Use the arm64 archive on ARM systems. Run as an unprivileged user with write access to the chosen data directory. The executable embeds the frontend and examples; no Node.js or separate database service is needed. Configure your service manager and HTTPS proxy for long-running remote use.
## Storage and configuration
| Environment variable | Default | Description |
+16 -1
View File
@@ -4,7 +4,7 @@
[返回项目首页](../README.zh-CN.md) · [使用指南](guide.zh-CN.md) · [开发指南](development.zh-CN.md)
RawMark 将前端嵌入 Go 服务,运行时使用 SQLite 与文件系统,不需要额外数据库服务。目前从源码构建 Docker 镜像;以下命令不依赖预先发布的镜像仓库。
RawMark 将前端嵌入 Go 服务,运行时使用 SQLite 与文件系统,不需要额外数据库服务。可以使用正式镜像或从源码构建,以下源码构建方式继续保留。
## Docker 快速启动
@@ -52,6 +52,21 @@ RAWMARK_DATA_DIR=/your/storage/rawmark/data \
不要把快速开始中的容器与 Compose 实例同时指向同一份数据库或笔记库;切换部署方式前先停止旧实例、备份并确认数据位置。
## 预构建镜像与原生程序
正式镜像为 `ghcr.io/eezd/rawmark:0.1.0`,支持 Linux amd64 和 arm64。将上述 Docker 命令中的 `rawmark` 镜像名替换为它即可跳过源码构建。`latest` 跟随最新稳定版本;需要可控升级时请固定版本标签。仓库 Compose 文件继续支持源码构建。
[Releases 页面](https://github.com/eezd/RawMark/releases) 提供 Linux 原生压缩包及 `SHA256SUMS`。下载对应架构,先核对校验和再解压:
```sh
sha256sum --ignore-missing --check SHA256SUMS
tar -xzf rawmark_0.1.0_linux_amd64.tar.gz
./rawmark --version
RAWMARK_DATA="$HOME/rawmark-data" RAWMARK_ADDR=127.0.0.1:21000 ./rawmark
```
ARM 系统请使用 arm64 压缩包。以普通用户运行,并确保所选数据目录可写。程序已内嵌前端和示例,无需 Node.js 或独立数据库服务。长期远程运行请配置服务管理器和 HTTPS 反向代理。
## 存储与配置
| 环境变量 | 默认值 | 说明 |
+10
View File
@@ -107,3 +107,13 @@ Vue I18n Composition API supports `en` and `zh-CN`, defaulting to English. Share
Account language reuses the settings store's serial writes, server settings, and event synchronization. The sign-in page updates only the local startup cache; authentication loads the server value. CodeMirror updates controls through a locale Compartment without replacing the document, selection, or undo history. User content, existing paths, and plugin-supplied text remain unchanged.
Backend `internal/i18n/` preserves message IDs and parameters. Errors render at the HTTP boundary according to `Accept-Language`, retaining `errors.Is/As` and original diagnostics; logs keep their existing language. Existing index warnings are reanalyzed from source notes only when needed for translation, refreshing the entry's complete metadata and revision without changing the index format. Stale entries for deleted or moved notes are skipped; other read errors fail explicitly. Add both languages and interpolation parameters for new messages and run the corresponding dictionary-completeness, settings-sync, editor, and API tests.
## Version releases and the public demo
`VERSION` is the release-version source. Docker builds and release binaries inject it into `--version`; Vite uses it for the settings display. The existing content-derived PWA build hash remains independent.
For a release, update `VERSION`, `.github/release-notes.md`, and the paired installation examples; run the required checks, review and commit the changes, push `main`, then push the matching `vX.Y.Z` tag. `.github/workflows/release.yml` is the only release workflow: ordinary branch pushes do not run it, and publishing its Release does not start another workflow. Jobs check the project, test native Linux amd64/arm64 binaries, package those same binaries into a multi-platform image, deploy the demo, and publish the Release and stable image tags. Rerun failed jobs in the existing run when necessary; do not move published tags or overwrite release assets.
GitHub Pages must use the GitHub Actions publishing source, with the `github-pages` environment allowing release tags. The first GHCR package must be made public once in its package settings; verify anonymous pulls before announcing the release. Runtime production deployment is separate from publishing a version.
Build the static editor preview with `pnpm -C web build:demo`. Output is `web/dist-demo/`, with `/RawMark/` as its base path. It uses the existing editor with temporary page-only edits; no private API, authentication, persistent workspace, or Service Worker is used. The workflow deploys it to https://eezd.github.io/RawMark/ in the same release run.
+10
View File
@@ -107,3 +107,13 @@ python3 scripts/prepare-maple-font.py /path/to/MapleMonoNormalNL-NF-CN.zip
账户语言沿用 settings store 的串行写入、服务器设置与事件同步;登录页仅更新本机启动缓存,认证后读取服务器值。CodeMirror 使用 locale Compartment 更新控件,不替换文档、选区或撤销历史。用户正文、现有路径和插件提供的文字保持原样。
后端 `internal/i18n/` 保存消息 ID 与参数,错误在 HTTP 边界根据 `Accept-Language` 渲染,并保留 `errors.Is/As` 及原始诊断;日志遵循原有语言。既有索引警告只在需要时重新分析源笔记生成译文,同时更新该条目的完整元数据和版本,不改索引格式;已删除或移动的过期条目跳过,其他读取错误明确返回。新增文案同时补充中英字典与参数,运行字典完整性、设置同步、编辑器和 API 的相应测试。
## 版本发布与公开 Demo
`VERSION` 是发布版本的唯一来源。Docker 构建和发布二进制将其写入 `--version`,Vite 用于设置页面展示;既有 PWA 内容哈希保持独立。
发布时更新 `VERSION`、`.github/release-notes.md` 和双语安装示例,完成检查、review 和提交后 push `main`,再推送对应的 `vX.Y.Z` 标签。`.github/workflows/release.yml` 是唯一发布工作流:普通分支推送不触发,创建 Release 也不启动第二个工作流。同一次运行完成检查、Linux amd64/arm64 原生程序测试、以相同程序封装双架构镜像、Demo 部署及 Release 和稳定镜像标签发布。失败时在原 run 中重跑失败 job,不移动已发布标签或覆盖发布附件。
GitHub Pages 必须选择 GitHub Actions 作为发布来源,`github-pages` 环境需要允许版本标签部署。首次 GHCR 镜像需在包设置中将可见性改为 Public,公告前验证匿名拉取。生产实例部署与版本发布是不同操作。
执行 `pnpm -C web build:demo` 构建静态编辑器预览,输出至 `web/dist-demo/`,基础路径为 `/RawMark/`。复用现有编辑器,修改仅在当前页面保留;不使用私有 API、认证、持久化工作区或 Service Worker。工作流在同一次发布运行中部署至 https://eezd.github.io/RawMark/。