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
80 changes: 0 additions & 80 deletions .github/workflows/publish-canary.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Publish latest version
name: Publish

on:
workflow_dispatch:
push:
branches:
- main
- canary
paths-ignore:
- '**/package.json'
- 'lerna.json'
Expand Down Expand Up @@ -41,8 +42,7 @@ jobs:
- name: パッケージをインストール
run: pnpm install

# Enable lerna to commit on GitHub.
# Note that this does not work with protected branch.
# lernaがGitHub上でコミットできるようにする
- name: Configure git identity
run: |
git config --global user.name 'github-actions[bot]'
Expand All @@ -54,37 +54,64 @@ jobs:
- name: Build
run: pnpm build

# zenn-editor packages does not follow semantic versioning.
# This is because anyone should use latest version which is synced with zenn.dev
- name: Bump version to latest
- name: '[main] Bump version'
if: github.ref_name == 'main'
run: pnpm lerna version patch --yes --no-private
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: '[canary] Bump version'
if: github.ref_name == 'canary'
run: pnpm lerna version prerelease --yes --no-private
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set released version to env
run: node -p -e '`RELEASED_PACKAGE_VERSION=${require("./lerna.json").version}`' >> $GITHUB_ENV

- name: Create release
- name: '[main] Create release'
if: github.ref_name == 'main'
uses: release-drafter/release-drafter@v5
with:
version: ${{ env.RELEASED_PACKAGE_VERSION }}
name: ${{ env.RELEASED_PACKAGE_VERSION }}
tag: ${{ env.RELEASED_PACKAGE_VERSION }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: '[canary] Create release'
if: github.ref_name == 'canary'
uses: release-drafter/release-drafter@v5
with:
version: ${{ env.RELEASED_PACKAGE_VERSION }}
name: ${{ env.RELEASED_PACKAGE_VERSION }}
tag: ${{ env.RELEASED_PACKAGE_VERSION }}
publish: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish latest
- name: '[main] Publish'
if: github.ref_name == 'main'
run: pnpm lerna publish from-package --yes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
- name: '[canary] Publish'
if: github.ref_name == 'canary'
run: pnpm lerna publish from-package --yes --pre-dist-tag canary
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: '[main] Checkout'
if: github.ref_name == 'main'
uses: actions/checkout@v2
with:
ref: canary

- name: Reflect changes on main branch to canary branch.
- name: '[main] Reflect changes on main branch to canary branch'
if: github.ref_name == 'main'
run: |
git pull origin main
git push origin HEAD
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ lerna-debug.log
mise.toml
.serena
.pnpm-store
.rulesync/*/my-*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rulesync関連


# Generated by rulesync - AI tool configuration files
**/.amazonq/
Expand Down
10 changes: 10 additions & 0 deletions rulesync.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"targets": ["copilot", "cursor", "claudecode", "codexcli"],
"features": ["rules", "ignore", "mcp", "commands", "subagents"],
"baseDirs": ["."],
"delete": true,
"verbose": false,
"experimentalGlobal": false,
"experimentalSimulateCommands": false,
"experimentalSimulateSubagents": false,
}
Comment on lines +1 to +10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rulesync関連

Loading