From 5e5da4c95e60b646d7081b0ef9ca4ef85519351c Mon Sep 17 00:00:00 2001 From: yujeong-jeon Date: Fri, 6 Feb 2026 22:51:05 +0900 Subject: [PATCH 1/2] Add homepage field to package.json --- package.json | 6 +++++- packages/commit-helper/package.json | 1 + packages/commithelper-go/package.json | 1 + packages/fmb/package.json | 1 + packages/publint/package.json | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 36c25be..dcc08ad 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,11 @@ "type": "git", "url": "https://github.com/NaverPayDev/cli.git" }, + "bugs": { + "url": "https://github.com/NaverPayDev/cli/issues" + }, "version": "0.0.0", + "homepage": "https://github.com/NaverPayDev/cli", "scripts": { "prepare": "husky install", "start": "turbo run start", @@ -18,7 +22,7 @@ "markdownlint": "markdownlint '**/*.md' '#.changeset' '#**/CHANGELOG.md'", "markdownlint:fix": "markdownlint --fix '**/*.md' '#.changeset' '#**/CHANGELOG.md'", "clean": "turbo run clean && rm -rf ./node_modules && pnpm i", - "release:canary": "pnpm run build && changeset publish --no-git-tag", + "release:canary": "changeset publish --no-git-tag", "release": "pnpm run build && changeset publish" }, "lint-staged": { diff --git a/packages/commit-helper/package.json b/packages/commit-helper/package.json index a0ad800..7971359 100644 --- a/packages/commit-helper/package.json +++ b/packages/commit-helper/package.json @@ -3,6 +3,7 @@ "version": "1.2.1", "description": "help your commit in git", "main": "./dist/index.js", + "homepage": "https://github.com/NaverPayDev/cli/tree/main/packages/commit-helper", "bin": { "commit-helper": "./dist/index.js" }, diff --git a/packages/commithelper-go/package.json b/packages/commithelper-go/package.json index e135445..604d650 100644 --- a/packages/commithelper-go/package.json +++ b/packages/commithelper-go/package.json @@ -5,6 +5,7 @@ "bin": { "commithelper-go": "bin/cli.js" }, + "homepage": "https://github.com/NaverPayDev/cli/tree/main/packages/commithelper-go", "scripts": { "build:windows": "GOOS=windows GOARCH=amd64 go build -o dist/commithelper-go-windows-amd64.exe main.go", "build:macos:amd64": "GOOS=darwin GOARCH=amd64 go build -o dist/commithelper-go-darwin-amd64 main.go", diff --git a/packages/fmb/package.json b/packages/fmb/package.json index f41dc10..064feb4 100644 --- a/packages/fmb/package.json +++ b/packages/fmb/package.json @@ -10,6 +10,7 @@ "scripts": { "start": "node index.js" }, + "homepage": "https://github.com/NaverPayDev/cli/tree/main/packages/fmb", "keywords": [ "git", "cli", diff --git a/packages/publint/package.json b/packages/publint/package.json index f3fc818..d15b515 100644 --- a/packages/publint/package.json +++ b/packages/publint/package.json @@ -5,6 +5,7 @@ "main": "dist/src/index.js", "keywords": [], "author": "yceffort ", + "homepage": "https://github.com/NaverPayDev/cli/tree/main/packages/publint", "type": "module", "license": "ISC", "sideEffects": false, From 625c2fe445783786bcc7ef25d03aca6d27600736 Mon Sep 17 00:00:00 2001 From: yujeong-jeon Date: Fri, 6 Feb 2026 22:52:01 +0900 Subject: [PATCH 2/2] Enhance release workflow to support canary and RC publishing via issue comments --- .github/workflows/release.yaml | 91 +++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2c6443d..8432907 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,27 +4,50 @@ on: push: branches: - main + issue_comment: + types: + - created concurrency: ${{ github.workflow }}-${{ github.ref }} permissions: - contents: write # to create release + id-token: write + contents: write jobs: + get-branch: + if: github.event_name == 'issue_comment' && github.event.issue.pull_request && (github.event.comment.body == 'canary-publish' || github.event.comment.body == '/canary-publish' || github.event.comment.body == 'rc-publish' || github.event.comment.body == '/rc-publish') + runs-on: ubuntu-latest + outputs: + branch: ${{ steps.get_branch.outputs.branch }} + steps: + - name: Get PR branch name + id: get_branch + run: | + PR=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" ${{ github.event.issue.pull_request.url }}) + branch=$(echo "$PR" | jq -r '.head.ref') + echo "branch=$branch" >> "$GITHUB_OUTPUT" + release: runs-on: ubuntu-latest + needs: [get-branch] + if: | + always() && + (github.event_name == 'push' || + (github.event_name == 'issue_comment' && needs.get-branch.result == 'success')) outputs: published: ${{ steps.changesets.outputs.published }} commithelperGoWillBePublished: ${{ steps.checkCommitHelperGo.outputs.commithelperGoWillBePublished }} - packageVersion: ${{ steps.getPackageVersion.outputs.packageVersion }} + packageVersion: ${{ steps.getCommitHelperGoVersion.outputs.packageVersion }} env: SKIP_COMMIT_HELPER_POSTINSTALL: 1 GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: checkoutRepo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: + ref: ${{ needs.get-branch.outputs.branch || github.ref }} token: ${{ secrets.ACTION_TOKEN }} fetch-depth: 0 @@ -33,16 +56,21 @@ jobs: with: go-version: '1.24' + - uses: pnpm/action-setup@v4 + - name: useNodeJs uses: actions/setup-node@v4 with: node-version: '20.x' + cache: 'pnpm' - - name: installCorepack - run: npm install -g corepack@0.31.0 - - - name: enableCorepack - run: corepack enable + - name: Check and upgrade npm + run: | + echo "Current npm version:" + npm --version + npm install -g npm@latest + echo "Upgraded npm version:" + npm --version - name: installDependencies run: pnpm install --frozen-lockfile @@ -64,8 +92,8 @@ jobs: echo "commithelperGoWillBePublished=true" >> $GITHUB_OUTPUT fi - - name: getPackageVersion - id: getPackageVersion + - name: getCommitHelperGoVersion + id: getCommitHelperGoVersion run: | packageVersion=$(cat packages/commithelper-go/package.json | jq -r '.version') echo "packageVersion=$packageVersion" >> $GITHUB_OUTPUT @@ -73,16 +101,45 @@ jobs: - name: buildNodePackages run: pnpm build - - name: createReleasePullRequestOrPublishToNpm - id: changesets - uses: changesets/action@v1 + - name: Publish - Release + if: github.event_name == 'push' + uses: NaverPayDev/changeset-actions/publish@main with: - title: '🚀 version changed packages' - commit: '📦 bump changed packages version' - publish: pnpm release + github_token: ${{ secrets.ACTION_TOKEN }} + git_username: npayfebot + git_email: npay.fe.bot@navercorp.com + publish_script: pnpm release + pr_title: '🚀 version changed packages' + commit_message: '📦 bump changed packages version' + create_github_release_tag: true + formatting_script: pnpm run markdownlint:fix env: GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Publish - Canary + if: github.event_name == 'issue_comment' && (github.event.comment.body == 'canary-publish' || github.event.comment.body == '/canary-publish') + uses: NaverPayDev/changeset-actions/canary-publish@main + with: + github_token: ${{ secrets.ACTION_TOKEN }} + npm_tag: canary + publish_script: pnpm run release:canary + packages_dir: 'packages' + excludes: '.turbo,.github' + version_template: '{VERSION}-canary.{DATE}-{COMMITID7}' + + - name: Publish - RC + if: github.event_name == 'issue_comment' && (github.event.comment.body == 'rc-publish' || github.event.comment.body == '/rc-publish') + uses: NaverPayDev/changeset-actions/canary-publish@main + with: + github_token: ${{ secrets.ACTION_TOKEN }} + npm_tag: rc + publish_script: pnpm run release:canary + packages_dir: 'packages' + excludes: '.turbo,.github' + version_template: '{VERSION}-rc.{DATE}-{COMMITID7}' + create_release: true + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} upload-assets: needs: release