From 845809b2628a23a384b95b8df5f2dc17f1aace94 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 26 Aug 2026 21:52:39 +0000 Subject: [PATCH 1/3] ci: create GitHub Releases for tagged versions npm already publishes on v* tags, but production GitHub Releases were created by hand. Mirror the develop pre-release job so pushing a version tag also generates a GitHub Release, skipping if one already exists. Co-authored-by: Yukai Huang --- .github/workflows/publish.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1786300..4ed3f04 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,7 +9,7 @@ on: permissions: id-token: write # Required for OIDC - contents: write # Required for GitHub pre-releases + contents: write # Required for GitHub releases jobs: publish-release: @@ -45,6 +45,20 @@ jobs: - name: Publish to npm run: npm publish --access public + - name: Create GitHub release + env: + GH_TOKEN: ${{ github.token }} + run: | + TAG="${GITHUB_REF_NAME}" + if gh release view "$TAG" >/dev/null 2>&1; then + echo "GitHub release ${TAG} already exists, skipping" + exit 0 + fi + gh release create "$TAG" \ + --title "$TAG" \ + --generate-notes \ + --latest + publish-prerelease: name: Pre-release (develop) if: github.ref == 'refs/heads/develop' From 9b1019c348b568cebfc1d0d8a9b58891e326da5c Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 26 Aug 2026 21:52:39 +0000 Subject: [PATCH 2/3] chore: release v2.5.1 Bump the package version and document tags, update-command permission flags, the permission-flag overwrite fix, skill and CodiMD docs, and develop-branch prereleases. Co-authored-by: Yukai Huang --- CHANGELOG.md | 18 +++++++++++++++ README.md | 64 ++++++++++++++++++++++++++-------------------------- package.json | 2 +- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9937d..8ac64e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to HackMD-CLI will be documented in this file. +## 2.5.1 + +### Added + +- `--tags` flag for `notes create`, `notes update`, `team-notes create`, and `team-notes update` +- Tags column on `notes` and `team-notes` list output +- `--readPermission`, `--writePermission`, and `--permalink` flags for `notes update` and `team-notes update` +- Automated npm prereleases and GitHub pre-releases from the `develop` branch + +### Changed + +- Agent skill now includes workflow verification steps and an error-handling table +- CodiMD compatibility notice now points to the standalone [codimd-cli](https://github.com/hackmdio/codimd-cli) + +### Fixed + +- `readPermission` and `writePermission` flags no longer overwrite each other when both are set + ## 2.5.0 ### Added diff --git a/README.md b/README.md index 8ac1e55..244b738 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ $ npm install -g @hackmd/hackmd-cli $ hackmd-cli COMMAND running command... $ hackmd-cli (--version|-v) -@hackmd/hackmd-cli/2.5.0 darwin-arm64 node-v26.0.0 +@hackmd/hackmd-cli/2.5.1 darwin-arm64 node-v26.0.0 $ hackmd-cli --help [COMMAND] USAGE $ hackmd-cli COMMAND @@ -179,7 +179,7 @@ EXAMPLES # A note to be exported ``` -_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/export.ts)_ +_See code: [src/commands/export.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/export.ts)_ ## `hackmd-cli folders` @@ -213,7 +213,7 @@ EXAMPLES 91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Project documentation 1F600 engineering fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c ``` -_See code: [src/commands/folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/folders/index.ts)_ +_See code: [src/commands/folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/folders/index.ts)_ ## `hackmd-cli folders create` @@ -369,7 +369,7 @@ EXAMPLES BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test ``` -_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/history.ts)_ +_See code: [src/commands/history.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/history.ts)_ ## `hackmd-cli login` @@ -391,7 +391,7 @@ EXAMPLES Login successfully ``` -_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/login.ts)_ +_See code: [src/commands/login.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/login.ts)_ ## `hackmd-cli logout` @@ -412,7 +412,7 @@ EXAMPLES You've logged out successfully ``` -_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/logout.ts)_ +_See code: [src/commands/logout.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/logout.ts)_ ## `hackmd-cli notes` @@ -446,7 +446,7 @@ EXAMPLES raUuSTetT5uQbqQfLnz9lA CLI test note gvfz2UB5THiKABQJQnLs6Q null ``` -_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/notes/index.ts)_ +_See code: [src/commands/notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/notes/index.ts)_ ## `hackmd-cli notes create` @@ -522,18 +522,18 @@ Update note ``` USAGE - $ hackmd-cli notes update [--content ] [-h] [--noteId ] [--parentFolderId ] [--permalink ] - [--readPermission ] [--tags ] [--writePermission ] + $ hackmd-cli notes update [--content ] [-h] [--noteId ] [--parentFolderId ] [--permalink + ] [--readPermission ] [--tags ] [--writePermission ] FLAGS - -h, --help Show CLI help. - --content= new note content - --noteId= HackMD note id - --parentFolderId= parent folder id - --permalink= note permalink - --readPermission= set note permission: owner, signed_in, guest - --tags= set note tags, comma-separated (e.g. tag1,tag2) - --writePermission= set note permission: owner, signed_in, guest + -h, --help Show CLI help. + --content= new note content + --noteId= HackMD note id + --parentFolderId= parent folder id + --permalink= note permalink + --readPermission= set note permission: owner, signed_in, guest + --tags= set note tags, comma-separated (e.g. tag1,tag2) + --writePermission= set note permission: owner, signed_in, guest DESCRIPTION Update note @@ -581,7 +581,7 @@ EXAMPLES 91722050-bf47-4334-9e5d-87125a724c29 #4F46E5 Team handbook 1F600 team-docs fc7a3d48-4a07-4cbf-bf4f-e65dd896e01c ``` -_See code: [src/commands/team-folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/team-folders/index.ts)_ +_See code: [src/commands/team-folders/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-folders/index.ts)_ ## `hackmd-cli team-folders create` @@ -722,7 +722,7 @@ EXAMPLES BnC6gN0_TfStV2KKmPPXeg Welcome to your team's workspace null CLI-test ``` -_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/team-notes/index.ts)_ +_See code: [src/commands/team-notes/index.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/team-notes/index.ts)_ ## `hackmd-cli team-notes create` @@ -801,19 +801,19 @@ Update team note ``` USAGE - $ hackmd-cli team-notes update [--content ] [-h] [--noteId ] [--parentFolderId ] - [--permalink ] [--readPermission ] [--tags ] [--teamPath ] [--writePermission ] + $ hackmd-cli team-notes update [--content ] [-h] [--noteId ] [--parentFolderId ] [--permalink + ] [--readPermission ] [--tags ] [--teamPath ] [--writePermission ] FLAGS - -h, --help Show CLI help. - --content= new note content - --noteId= HackMD note id - --parentFolderId= parent folder id - --permalink= note permalink - --readPermission= set note permission: owner, signed_in, guest - --tags= set note tags, comma-separated (e.g. tag1,tag2) - --teamPath= HackMD team path - --writePermission= set note permission: owner, signed_in, guest + -h, --help Show CLI help. + --content= new note content + --noteId= HackMD note id + --parentFolderId= parent folder id + --permalink= note permalink + --readPermission= set note permission: owner, signed_in, guest + --tags= set note tags, comma-separated (e.g. tag1,tag2) + --teamPath= HackMD team path + --writePermission= set note permission: owner, signed_in, guest DESCRIPTION Update team note @@ -859,7 +859,7 @@ EXAMPLES f76308a6-d77a-41f6-86d0-8ada426a6fb4 CLI test team CLI-test 82f7f3d9-4079-4c78-8a00-14094272ece9 ``` -_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/teams.ts)_ +_See code: [src/commands/teams.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/teams.ts)_ ## `hackmd-cli version` @@ -912,7 +912,7 @@ EXAMPLES 82f7f3d9-4079-4c78-8a00-14094272ece9 Ming-Hsiu Tsai null gvfz2UB5THiKABQJQnLs6Q ``` -_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.0/src/commands/whoami.ts)_ +_See code: [src/commands/whoami.ts](https://github.com/hackmdio/hackmd-cli/blob/v2.5.1/src/commands/whoami.ts)_ ## License diff --git a/package.json b/package.json index 132229c..5444642 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hackmd/hackmd-cli", - "version": "2.5.0", + "version": "2.5.1", "author": "HackMD Team", "bin": { "hackmd-cli": "./bin/run" From 6ea1768057b33b1b38c781eb0ade581e9d8b8bba Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 26 Aug 2026 21:55:04 +0000 Subject: [PATCH 3/3] ci: seed GitHub Releases with the changelog entry Use the matching CHANGELOG.md section as the release notes and still append GitHub's generated PR list so tagged publishes match v2.5.0-style history without requiring a manual GitHub UI draft. Co-authored-by: Yukai Huang --- .github/workflows/publish.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ed3f04..c628551 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,12 +50,19 @@ jobs: GH_TOKEN: ${{ github.token }} run: | TAG="${GITHUB_REF_NAME}" + VERSION="${TAG#v}" if gh release view "$TAG" >/dev/null 2>&1; then echo "GitHub release ${TAG} already exists, skipping" exit 0 fi + NOTES="$(awk -v ver="$VERSION" ' + $0 == "## " ver {p=1; next} + p && /^## / {exit} + p + ' CHANGELOG.md)" gh release create "$TAG" \ --title "$TAG" \ + --notes "$NOTES" \ --generate-notes \ --latest