Skip to content

Overhaul publishing workflows - #18

Merged
MelbourneDeveloper merged 27 commits into
mainfrom
publishfixes
Dec 13, 2025
Merged

MelbourneDeveloper merged 27 commits into
mainfrom
publishfixes

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Owner

TLDR;

Consolidate publishing workflows to eliminate duplication and implement proper tiered deployment with workflow chaining.

What Does This Do?

  • Creates reusable workflow _publish-packages.yml with loop-based publishing (no duplication)
  • Creates orchestrator publish-release.yml that validates main branch, creates release branch, and PR
  • Refactors tier workflows to ~20 lines each, calling the reusable workflow
  • Implements workflow_run triggers so tiers chain automatically after predecessor succeeds
  • Uses GitHub Environment wait timers (20 min) instead of blocking/waiting in workflows

Brief Details?

Before: 3 bloated workflows (50-134 lines each) with repeated publish steps per package

After:

  • publish-release.yml - Tag trigger, validates main, creates release branch + PR
  • _publish-packages.yml - Reusable, loop-based publishing
  • publish-tier1.yml (19 lines) - workflow_run from Release
  • publish-tier2.yml (21 lines) - workflow_run from Tier 1, 20 min env wait
  • publish-tier3.yml (21 lines) - workflow_run from Tier 2, 20 min env wait

Flow:

Release Tag on main → publish-release.yml
    ↓ workflow_run (success)
Tier 1 → immediate
    ↓ workflow_run (success) + 20 min env wait
Tier 2
    ↓ workflow_run (success) + 20 min env wait
Tier 3

How Do The Tests Prove The Change Works?

Workflow syntax validated. Requires GitHub Environment configuration:

  • pub.dev - no wait timer
  • pub.dev-tier2 - 20 minute wait timer
  • pub.dev-tier3 - 20 minute wait timer

- Add npm install step in CI workflow for packages with package.json
- Add npm install in test_tier.sh for Node.js packages before running tests
- Fixes "Cannot find module 'express'" and 'better-sqlite3' errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)
These examples are in examples/reflux_demo/, not examples/

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dart_node_mcp is primarily extension types with external methods
and typedefs - no executable Dart code to instrument. Tests pass
but coverage is N/A.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dart_node_react_native is also primarily extension types with
external methods - pure JS interop with no executable Dart code
to instrument.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
… tests

- Add build step for packages with build.sh (too_many_cooks needs to
  compile server to JS before tests can spawn it as subprocess)
- Skip coverage for VM packages that spawn subprocesses (coverage can't
  instrument code running in separate process)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Excluded examples:
- backend: needs server compiled and running
- mobile: needs React Native setup
- flutter_counter: needs Flutter SDK
- too_many_cooks_vscode_extension: needs VSCode environment

🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Find release branch by name instead of head_branch (was returning 'main')
- Add id-token permission for pub.dev OIDC auth
- Verify prerequisite packages on pub.dev before publishing tier 2/3
- Skip already-published packages
- Use fetch-depth: 0 to access all branches
@MelbourneDeveloper MelbourneDeveloper changed the title fix: overhaul publishing workflows Overhaul publishing workflows Dec 13, 2025
@MelbourneDeveloper
MelbourneDeveloper merged commit cd9211e into main Dec 13, 2025
1 check passed
@MelbourneDeveloper
MelbourneDeveloper deleted the publishfixes branch December 13, 2025 08:01
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