Skip to content

Add Codex plugin release packaging script and workflow - #261

Merged
keertip merged 4 commits into
flutter:mainfrom
keertip:codex-workflow-slim
Nov 4, 2026
Merged

keertip merged 4 commits into
flutter:mainfrom
keertip:codex-workflow-slim

Conversation

@keertip

@keertip keertip commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Adds a standalone script (tool/build_codex_plugin.dart) and GitHub Actions workflow (.github/workflows/release_codex_plugin.yaml) to build and package the dart-flutter Codex plugin zip for the OpenAI plugin submission portal.

What this changes

  • tool/build_codex_plugin.dart: A self-contained Dart script (using only dart:io and dart:convert, with no new pubspec.yaml dependencies) that:
    • Validates the repo manifest and packaging inputs (semver version matching --tag, interface.shortDescription <= 30 characters, existing branding assets, and tracked skills/<skill>/SKILL.md directories).
    • Generates a skills-only release copy of .codex-plugin/plugin.json in a temporary staging directory with mcpServers and MCP references removed (since OpenAI only accepts local stdio MCP servers from allowlisted partners) and sets extensions.com.openai.publication.release_notes from skill changes since the previous codex-plugin-v* tag.
    • Stages only Git-tracked files under skills/ (git ls-files) plus the referenced branding assets and builds dist/<name>-codex-<version>.zip.
    • Supports --release (and --release --dry-run) to verify a clean main branch, create and push the codex-plugin-v<version> tag, wait for the CI workflow run via gh, and download the built zip artifact to dist/.
  • .github/workflows/release_codex_plugin.yaml:
    • Runs on codex-plugin-v* tags, workflow_dispatch, and pull requests touching .codex-plugin/, assets/, skills/, or tool/build_codex_plugin.dart.
    • Checks formatting (dart format), runs static analysis (dart analyze --fatal-infos), and builds the release zip.
    • Uploads dart-flutter-codex-<version>.zip as a workflow artifact (30-day retention) on tag and manual runs.
    • Opens a GitHub issue labeled codex-release if a tag-triggered release build fails.
  • .gitignore: Ignores dist/.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Dart script at tool/build_codex_plugin.dart to automate building, verifying, and releasing the Dart and Flutter Codex plugin zip, while updating .gitignore to exclude the dist/ directory. The review feedback focuses on enhancing the script's robustness and concurrency. It is recommended to wrap external process executions (zip, gh, and git) in try-catch blocks to gracefully handle ProcessException when these command-line tools are not installed. Additionally, the synchronous Process.runSync call within the asynchronous polling loop of _waitForRun should be replaced with the asynchronous Process.run to avoid blocking the Dart event loop.

Comment thread tool/build_codex_plugin.dart Resolved
Comment thread tool/build_codex_plugin.dart Resolved
Comment thread tool/build_codex_plugin.dart Resolved
Comment thread tool/build_codex_plugin.dart Resolved
@keertip
keertip requested a review from johnpryan November 3, 2026 20:15
@keertip
keertip merged commit b7d5a0b into flutter:main Nov 4, 2026
13 checks passed
@keertip
keertip deleted the codex-workflow-slim branch November 4, 2026 20:55
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.

2 participants