2026-04-09 12:29:42 +00:00
# Notemd Release Workflow (Maintainers)
2026-04-16 12:41:02 +00:00
Language: **English** | [简体中文 ](./release-workflow.zh-CN.md )
2026-04-09 12:29:42 +00:00
This document is for maintainers and contributors, not end users.
## 1. Regression Baseline
Capture a before-change baseline:
```bash
npm run regression:language-baseline
```
After implementation, compare with the latest baseline:
```bash
npm run regression:language-compare
```
## 2. Verification Gate Before Release
Run:
```bash
npm run build
npm test -- --runInBand
2026-04-14 14:35:57 +00:00
npm run audit:i18n-ui
npm run audit:render-host
2026-04-09 12:29:42 +00:00
obsidian help
obsidian-cli help
git diff --check
```
2026-04-16 12:41:02 +00:00
If `obsidian-cli` is unavailable in the local environment, record it in release notes or release-handoff evidence.
2026-04-09 12:29:42 +00:00
## 3. Version Synchronization
Before publishing, ensure version references are aligned:
- `package.json`
- `manifest.json`
- `versions.json`
- `README.md`
- `README_zh.md`
- `change.md`
2026-04-14 05:27:37 +00:00
Release tags must use numeric `x.x.x` format. Do not add a `v` prefix: Obsidian community plugin publishing expects numeric tags only.
2026-04-16 12:41:02 +00:00
## 4. Release Notes Contract
Release notes now live in two complete checked-in files:
- English: `docs/releases/<tag>.md`
- Simplified Chinese: `docs/releases/<tag>.zh-CN.md`
2026-04-09 12:29:42 +00:00
2026-04-16 12:41:02 +00:00
Each file must be independently readable. The GitHub release helper composes those two files into one bilingual release body at publish time.
2026-04-09 12:29:42 +00:00
2026-04-16 12:41:02 +00:00
## 5. GitHub Release Requirements
2026-04-09 12:29:42 +00:00
Required release assets:
- `main.js`
- `manifest.json`
- `styles.css`
- `README.md`
2026-04-16 12:41:02 +00:00
## 6. Publish Command
2026-04-09 12:29:42 +00:00
```bash
2026-04-14 05:16:03 +00:00
npm run release:github -- < tag >
2026-04-09 12:29:42 +00:00
```
2026-04-14 05:16:03 +00:00
2026-04-16 12:41:02 +00:00
The helper now enforces the required packaged assets plus both checked-in release-note files before invoking GitHub:
2026-04-14 05:16:03 +00:00
2026-04-16 12:41:02 +00:00
- If the release does not exist yet, it combines `docs/releases/<tag>.md` and `docs/releases/<tag>.zh-CN.md` , then runs `gh release create ... --verify-tag` .
2026-04-14 05:16:03 +00:00
- If the release already exists, it runs `gh release upload ... --clobber` .
2026-04-14 05:27:37 +00:00
- If the tag is not numeric `x.x.x` , it fails immediately.
2026-04-14 05:16:03 +00:00
That second path is the repair path for cases where a release body was published but plugin assets were not uploaded.
2026-04-14 05:23:20 +00:00
2026-04-16 12:41:02 +00:00
## 7. CI Automation
2026-04-14 05:23:20 +00:00
The repository also ships `.github/workflows/release.yml` :
- Push a git tag to publish the release automatically.
2026-04-14 05:27:37 +00:00
- Use `workflow_dispatch` with a numeric `x.x.x` `tag` input to repair an existing release from CI.
2026-04-14 14:35:57 +00:00
- The workflow runs `npm ci` , `npm run build` , `npm test -- --runInBand` , `npm run audit:i18n-ui` , `npm run audit:render-host` , `git diff --check` , and finally `npm run release:github -- "$TAG_NAME"` .
2026-04-16 12:41:02 +00:00
- The workflow validates `^[0-9]+\.[0-9]+\.[0-9]+$` before checkout and publish, so `v1.8.2` -style tags are rejected.
2026-04-14 05:23:20 +00:00
The workflow intentionally reuses the checked-in release helper instead of duplicating asset lists or release-note logic inside YAML.