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
35 changes: 32 additions & 3 deletions .github/workflows/release-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ jobs:
git push origin "v$VERSION"
gh release create "v$VERSION" --title "v$VERSION" --generate-notes

# GITHUB_TOKEN が起こした release イベントは別 workflow をトリガーしない
# ため、release 後に走らせたい処理 (publish / stackblitz 更新) はいずれも
# 別 workflow ではなく同一 workflow の後続ジョブとして実行する。

publish:
needs: release-tag
# 新しいタグを作成した場合のみ publish する。GITHUB_TOKEN が起こした
# release イベントは別 workflow をトリガーしないため、publish は別
# workflow ではなく同一 workflow の後続ジョブとして実行する。
# 新しいタグを作成した場合のみ publish する。
if: needs.release-tag.outputs.created == 'true'
runs-on: ubuntu-latest
permissions:
Expand All @@ -65,3 +67,30 @@ jobs:
- run: pnpm run build
- name: Publish to npm
run: npm publish --provenance --access public

update-stackblitz:
needs: release-tag
# 新しいタグを作成した場合のみ stackblitz 用ブランチを更新する。
if: needs.release-tag.outputs.created == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
env:
VERSION: ${{ needs.release-tag.outputs.version }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Update examples package.json
run: |
for pkg in examples/*/package.json; do
sed -i 's/"emiel": "workspace:\*"/"emiel": "^'"$VERSION"'"/' "$pkg"
done
- name: Remove pnpm-lock.yaml from examples
run: find examples -maxdepth 2 -name "pnpm-lock.yaml" -delete
- name: Push to stackblitz branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -B stackblitz
git add examples/
git commit -m "chore: prepare examples for stackblitz (v$VERSION)"
git push origin stackblitz --force
32 changes: 0 additions & 32 deletions .github/workflows/stackblitz.yaml

This file was deleted.