Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .claude/commands/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
new_version = get_version_without_v_prefix($ARGUMENTS) # 例: 1.0.0
new_version_with_v_prefix = get_version_with_v_prefix($ARGUMENTS) # 例: v1.0.0

new_versionの指定がない場合、patchバージョンを現在のバージョンから+1した値をnew_version,new_version_with_v_prefixに設定します。

1. 現在 main ブランチにいることを確認します。main ブランチでない場合は、この操作を中止します。
2. `git pull` を実行します。
3. `git checkout -b release/{new_version_with_v_prefix}` を実行します。
4. `src/cli/index.ts` 内のバージョンを更新します。その後、`git add` と `git commit` を実行します。
5. `pnpm version {new_version} --no-git-tag-version` でバージョンを更新します。
6. `package.json` が変更されるため、`git commit` と `git push` を実行します。
7. `gh pr create` と `gh pr merge` を実行して、リリースブランチを main ブランチにマージします。
8. 前のバージョンタグと現在のコミット間のコード変更を比較して、リリース説明を準備します。
- 英語で記述します。
- 機密情報は含めません。
- `What's Changed`、`Contributors`、`Full Changelog` のセクションが必要です。
- `./tmp/release-notes.md` をリリースノートとして使用します。
9. 予防措置として、リリース内容に非公開にすべき情報が含まれていないことを確認します。
10. `gh release create {new_version_with_v_prefix} --title {new_version_with_v_prefix} --notes-file ./tmp/release-notes.md ...` コマンドを使用して、`github.com/classmethod/tsumiki` リポジトリでタイトルとタグの両方を new_version_with_v_prefix に設定し、ステップ4の内容を説明として使用してリリースを作成します。
11. main ブランチに戻ります。
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
quality:
name: Code Quality & Tests
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10.13.1

- name: Install dependencies
run: pnpm install --ignore-scripts

- name: Check no files generated after install
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "Error: Files were generated or modified after pnpm install"
git status --porcelain
exit 1
fi

- name: Run check
run: pnpm check

- name: Run secretlint
run: pnpm secretlint

- name: Run typecheck
run: pnpm typecheck

- name: Build project
run: pnpm build
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
release:
types: [created]

jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: main

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10.13.1

- name: Install dependencies
run: pnpm install

- name: Run quality checks
run: |
pnpm check
pnpm secretlint
pnpm typecheck

- name: Publish to npm
run: pnpm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ Thumbs.db

# Dependencies
node_modules/
.pnpm-store/
package-lock.json
yarn.lock
pnpm-lock.yaml

# Build output
dist/
*.tsbuildinfo
assets/

# Claude Code
.claude/settings.local.json

# Others
tmp/