/ LIVE
package-publish publish 用の workflow では特殊なことはしていないです dispatch から Semantic Versioning でリリースできるよう設定を追加してます Create GitHub Release (Automatic Notes) の step で、release.yml 通りの体裁で PR が自動的に分類されリリースノー
2025.06.16
package-publish
publish 用の workflow では特殊なことはしていないです
dispatch から Semantic Versioning でリリースできるよう設定を追加してます
Create GitHub Release (Automatic Notes)
の step で、release.yml 通りの体裁で PR が自動的に分類されリリースノートが作成されます🎉
public-package.yml
name: Publish Packages
on:
workflow_dispatch:
inputs:
release_type:
description: "Select release type"
required: true
type: choice
default: "patch"
options:
- major
- minor
- patch
- premajor
- prerelease
prerelease_id:
description: "Select prerelease id (used only if release_type is prerelease)"
required: false
type: choice
default: "alpha"
options:
- alpha
- beta
- rc
jobs:
publish:
runs-on: ubuntu-latest
#...省略
steps:
# ブランチが release/ で始まることを確認し、release/ 以外の場合はエラーを出す
- name: Verify release branch
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
run: |
echo "This workflow can only be run on release branches."
exit 1
# ~~ チェックアウト やら ビルド やら ~~
# release branch 用にバージョンを更新
- name: Bump version for release branch
id: bump_version
run: |
if [ "${{ inputs.release_type }}" = "premajor" ] || [ "${{ inputs.release_type }}" = "prerelease" ]; then
NEW_VERSION=$(npm version ${{ inputs.release_type }} --preid "${{ inputs.prerelease_id }}" -m "chore: Bump version to %s")
else
NEW_VERSION=$(npm version ${{ inputs.release_type }} -m "chore: Bump version to %s")
fi
echo "NEW_VERSION=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
# コミットとタグをプッシュ
- name: Push commit and tags
run: git push --follow-tags
# 公開
- name: Publish 🎁
run: pnpm publish --provenance --access public --publish-branch "${GITHUB_REF#refs/heads/}" --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# ~~ main へのバージョン同期 ~~
# release note の作成
# release note の設定は release.yml を参照
- name: Create GitHub Release (Automatic Notes)
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const tagName = process.env.NEW_VERSION;
const response = await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: tagName,
name: tagName,
generate_release_notes: true,
draft: false,
prerelease: (tagName.includes('-')),
});
core.info(`Created release: ${response.data.html_url}`);
core.setOutput("release_id", response.data.id);
core.setOutput("release_url", response.data.html_url);
env:
NEW_VERSION: ${{ steps.bump_version.outputs.NEW_VERSION }}
ロードマップ
今後は以下の機能追加と改善に取り組む想定です
優先度 | 予定 |
---|---|
High | アクセシビリティ対応 (キーボード操作 / ARIA) |
High | 親子タスク表示 (グルーピング) |
Mid | TaskBar API: onClick / onContextMenu など |
Mid | テーマカスタマイズ & ダークモード |
Low | UI の微調整 |
まとめ
react-gantt-flow は「軽量 × 稲妻線 × 型安全」が売りの OSS ガントチャートです
今後は A11y & グルーピングを強化予定となります😉
ライブラリ開発はシステム開発とは違った面白さがありとても魅力的です
次回記事では一番苦戦した dependenciesArrow の実装について深掘り or ライブラリ作成の為の Vite 設定 のどちらかです!お楽しみに! 🙌