diff --git a/.github/workflows/ci-all.yml b/.github/workflows/ci-all.yml new file mode 100644 index 0000000..2c29d9f --- /dev/null +++ b/.github/workflows/ci-all.yml @@ -0,0 +1,37 @@ +# Orchestrates all CI workflows - runs on PRs, pushes to main, and manual dispatch +# Individual test workflows are called as reusable workflows +name: CI All + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + ci: + uses: ./.github/workflows/ci.yml + + test-base-action: + uses: ./.github/workflows/test-base-action.yml + secrets: inherit # Required for ANTHROPIC_API_KEY + + test-custom-executables: + uses: ./.github/workflows/test-custom-executables.yml + secrets: inherit + + test-mcp-servers: + uses: ./.github/workflows/test-mcp-servers.yml + secrets: inherit + + test-settings: + uses: ./.github/workflows/test-settings.yml + secrets: inherit + + test-structured-output: + uses: ./.github/workflows/test-structured-output.yml + secrets: inherit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c24dfdf..27ef5be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,8 @@ name: CI on: - push: - branches: [main] pull_request: + workflow_call: jobs: test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cff3352..45a960b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,10 +8,23 @@ on: required: false type: boolean default: false + workflow_run: + workflows: ["CI All"] + types: + - completed + branches: + - main jobs: create-release: runs-on: ubuntu-latest + # Run if: manual dispatch OR (CI All succeeded AND commit is a version bump) + if: | + github.event_name == 'workflow_dispatch' || + (github.event.workflow_run.conclusion == 'success' && + github.event.workflow_run.head_branch == 'main' && + github.event.workflow_run.event == 'push' && + startsWith(github.event.workflow_run.head_commit.message, 'chore: bump Claude Code to')) environment: production permissions: contents: write @@ -84,7 +97,8 @@ jobs: update-major-tag: needs: create-release - if: ${{ !inputs.dry_run }} + # Skip for dry runs (workflow_run events are never dry runs) + if: github.event_name == 'workflow_run' || !inputs.dry_run runs-on: ubuntu-latest environment: production permissions: diff --git a/.github/workflows/test-base-action.yml b/.github/workflows/test-base-action.yml index b489663..7a9816c 100644 --- a/.github/workflows/test-base-action.yml +++ b/.github/workflows/test-base-action.yml @@ -1,9 +1,6 @@ name: Test Claude Code Action on: - push: - branches: - - main pull_request: workflow_dispatch: inputs: @@ -11,6 +8,7 @@ on: description: "Test prompt for Claude" required: false default: "List the files in the current directory starting with 'package'" + workflow_call: jobs: test-inline-prompt: diff --git a/.github/workflows/test-custom-executables.yml b/.github/workflows/test-custom-executables.yml index 2fd2fc0..59c591b 100644 --- a/.github/workflows/test-custom-executables.yml +++ b/.github/workflows/test-custom-executables.yml @@ -1,11 +1,9 @@ name: Test Custom Executables on: - push: - branches: - - main pull_request: workflow_dispatch: + workflow_call: jobs: test-custom-executables: diff --git a/.github/workflows/test-mcp-servers.yml b/.github/workflows/test-mcp-servers.yml index 46db1a7..a3182b4 100644 --- a/.github/workflows/test-mcp-servers.yml +++ b/.github/workflows/test-mcp-servers.yml @@ -1,11 +1,9 @@ name: Test MCP Servers on: - push: - branches: [main] pull_request: - branches: [main] workflow_dispatch: + workflow_call: jobs: test-mcp-integration: diff --git a/.github/workflows/test-settings.yml b/.github/workflows/test-settings.yml index caa7f35..b043680 100644 --- a/.github/workflows/test-settings.yml +++ b/.github/workflows/test-settings.yml @@ -1,11 +1,9 @@ name: Test Settings Feature on: - push: - branches: - - main pull_request: workflow_dispatch: + workflow_call: jobs: test-settings-inline-allow: diff --git a/.github/workflows/test-structured-output.yml b/.github/workflows/test-structured-output.yml index 9b33360..adc9213 100644 --- a/.github/workflows/test-structured-output.yml +++ b/.github/workflows/test-structured-output.yml @@ -1,11 +1,9 @@ name: Test Structured Outputs on: - push: - branches: - - main pull_request: workflow_dispatch: + workflow_call: permissions: contents: read