Skip to content

Add shared Playground preview workflows#97

Merged
fumikito merged 1 commit into
mainfrom
feature/playground-preview
Mar 24, 2026
Merged

Add shared Playground preview workflows#97
fumikito merged 1 commit into
mainfrom
feature/playground-preview

Conversation

@fumikito
Copy link
Copy Markdown
Contributor

Summary

PRに playground ラベルを付けると WordPress Playground プレビューを生成する共有ワークフロー2つを追加。

  • playground-preview-build.yml: プラグインをビルドしてZIPをアーティファクトにアップロード
  • playground-preview-publish.yml: ZIPを公開URLに配置し、PRにプレビューコメントを投稿

使い方(各プラグインリポジトリ側)

Build caller (14行)

name: Playground Preview - Build
on:
  pull_request:
    types: [labeled, synchronize, reopened]
permissions:
  contents: read
jobs:
  build:
    if: >
      contains(github.event.pull_request.labels.*.name, 'playground') &&
      (github.event.action != 'labeled' || github.event.label.name == 'playground')
    uses: tarosky/workflows/.github/workflows/playground-preview-build.yml@main

Publish caller (17行)

name: Playground Preview - Publish
on:
  workflow_run:
    workflows: ["Playground Preview - Build"]
    types: [completed]
permissions:
  contents: write
  pull-requests: write
jobs:
  publish:
    if: >
      github.event.workflow_run.event == 'pull_request' &&
      github.event.workflow_run.conclusion == 'success'
    uses: tarosky/workflows/.github/workflows/playground-preview-publish.yml@main

前提条件

  • プラグインリポジトリに playground ラベルを作成
  • ci-artifacts pre-release を作成: gh release create ci-artifacts --prerelease --title "CI Artifacts" --notes "Do not delete."

taro-lead-next で動作確認済み

🤖 Generated with Claude Code

- playground-preview-build.yml: Reusable workflow for building plugin ZIP
- playground-preview-publish.yml: Reusable workflow for exposing artifact and posting preview comment
- Parameterized with sensible defaults for tarosky plugins

Co-authored-by: Claude <noreply@anthropic.com>
@fumikito fumikito merged commit e2ca30e into main Mar 24, 2026
8 checks passed
@fumikito fumikito deleted the feature/playground-preview branch March 24, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant