skillhub/.github/workflows
Cheney 0b1c366f8d
refactor(cli): improve publish-cli script reliability (#441)
* refactor(cli): improve publish-cli script reliability

- Move version computation and pre-flight checks before build-and-test
  to fail fast on conflicts (existing branch/tag) instead of wasting
  minutes on lint/test/build
- Add INT/TERM signal handlers to cleanup trap so Ctrl+C during build
  properly restores working tree state
- Update Makefile help text to reflect PR-based workflow

* fix(cli): use git checkout -f for robust cleanup

Address code review feedback from gemini-code-assist bot:

- Use `git checkout -f` in on-release and committed cleanup stages
  to ensure reliable branch switching even when files are staged
  but not committed (e.g., interrupted after `git add` but before
  `git commit`)
- Remove redundant `git checkout -- <file>` in on-release stage
  since `-f` already discards all local changes

This prevents cleanup failures when the script is interrupted
between staging and committing.

* fix(cli): address PR #441 review findings

- Fix ERR trap bypass: remove `if !` wrapper around `gh pr create` so
  set -e triggers the trap and prints pushed-stage recovery instructions
- Fix command injection: all node -e/-p calls now use process.env
  instead of interpolating shell variables into JS string literals
- Rewrite cli/RELEASE.md to document the new PR-based release flow
- Rewrite scripts/tests/publish-cli-test.sh with 10 tests covering
  the new flow (stubs for bun/gh, pre-flight checks, happy path,
  cleanup state machine stages)

* fix(cli): address PR #441 review findings from @dongmucat

- Bind release tag to origin/main: PR body, end-of-run hint, and
  cli/RELEASE.md now use `git tag $TAG origin/main` so the tag is
  always placed on the merged commit, regardless of local branch state
- Reject prerelease tags in version computation: if the latest cli-v*
  tag contains non-X.Y.Z characters (e.g., -rc.1), exit with a clear
  message instead of crashing in node parsing
- Add pr-scripts.yml workflow: runs publish-cli-test.sh on scripts/**
  changes so the release script regression suite gates PRs
- Add Test 11 covering prerelease tag rejection

* fix(cli): compute publish baseline from origin tags only

A failed `git push origin cli-vX.Y.Z` after a successful local tag
leaves an orphan tag locally. The previous `git tag --list` baseline
would then treat it as the latest release, causing skipped versions or
publishes based on an unreleased tag.

Switch to `git ls-remote --tags --refs origin 'cli-v*' | sort -V` so
the baseline reflects only what is actually on origin. Local orphan
tags can still collide with the computed target tag, which fails fast
with a clear message as before.

Adds test 12 covering the orphan-tag scenario.
2026-06-02 14:30:39 +08:00
..
claim-issue-reward.yml chore: add GitHub-reward form, scripts & actions (#221) 2026-04-07 19:02:59 +08:00
deepwiki.yml feat(profile): add field policy config and GET response 2026-03-20 14:59:21 +08:00
deploy-docs.yml docs: add VitePress bilingual documentation site (#208) 2026-04-02 13:43:55 +08:00
issue-backlog-rescore.yml [codex] add issue triage automation mvp (#268) 2026-04-09 15:04:33 +08:00
issue-triage.yml [codex] add issue triage automation mvp (#268) 2026-04-09 15:04:33 +08:00
pr-batch-test-deploy.yml feat(ci): add PR batch test deployment workflow (#275) 2026-04-09 18:45:14 +08:00
pr-cli.yml feat(cli): add SkillHub CLI v1 with full command suite 2026-04-29 15:37:04 +08:00
pr-e2e.yml test(e2e,ci): migrate web e2e to real API and add PR e2e workflow (#198) 2026-04-01 14:41:23 +08:00
pr-scripts.yml refactor(cli): improve publish-cli script reliability (#441) 2026-06-02 14:30:39 +08:00
pr-tests.yml chore(deps): bump vite/postcss/picomatch/flatted/esbuild to patch Dependabot alerts 2026-05-28 10:17:27 +08:00
publish-images.yml feat: add scanner service to v0.2.0 release deployment (#189) 2026-03-30 19:01:51 +08:00
release-cli.yml fix(cli): align checkout ref across all workflow jobs 2026-05-12 17:29:58 +08:00
release-notes.yml feat(ci): add AI-powered release notes generation (#322) 2026-04-17 15:19:48 +08:00
statistic-member-reward.yml chore: add GitHub-reward form, scripts & actions (#221) 2026-04-07 19:02:59 +08:00