diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2040b1e..74e07b7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,6 +30,8 @@ jobs: version=$(jq -r .version .claude-plugin/plugin.json) echo "version=$version" >> "$GITHUB_OUTPUT" echo "tag=v$version" >> "$GITHUB_OUTPUT" + awk -v heading="## $version" '$0 == heading { found = 1; next } /^## / { found = 0 } found' \ + CHANGELOG.md > "$RUNNER_TEMP/notes.md" - name: Build the OpenAI plugin ZIP env: @@ -38,14 +40,13 @@ jobs: run: | stage="$RUNNER_TEMP/polar" mkdir -p "$stage/.codex-plugin" - if [ -n "$DEMO_RECORDING_URL" ]; then - jq --arg url "$DEMO_RECORDING_URL" \ - '.extensions["com.openai"].review.demo_recording_url = $url' \ - openai/plugin.json > "$stage/.codex-plugin/plugin.json" - else + if [ -z "$DEMO_RECORDING_URL" ]; then echo "::warning::The OPENAI_DEMO_RECORDING_URL secret isn't set, so OpenAI's portal will reject this ZIP." - cp openai/plugin.json "$stage/.codex-plugin/plugin.json" fi + jq --rawfile notes "$RUNNER_TEMP/notes.md" --arg url "$DEMO_RECORDING_URL" ' + .extensions["com.openai"].publication.release_notes = ($notes | gsub("^\\s+|\\s+$"; "")) + | if $url == "" then . else .extensions["com.openai"].review.demo_recording_url = $url end + ' openai/plugin.json > "$stage/.codex-plugin/plugin.json" cp openai/mcp.json "$stage/.mcp.json" cp -R skills README.md LICENSE "$stage/" for asset in $(jq -r '.interface.logo, .interface.composerIcon' openai/plugin.json | sort -u); do @@ -71,6 +72,4 @@ jobs: echo "Release $TAG already exists." exit 0 fi - awk -v heading="## $VERSION" '$0 == heading { found = 1; next } /^## / { found = 0 } found' \ - CHANGELOG.md > "$RUNNER_TEMP/notes.md" gh release create "$TAG" --target "$GITHUB_SHA" --title "$TAG" --notes-file "$RUNNER_TEMP/notes.md" diff --git a/RELEASE.md b/RELEASE.md index c3cd360..399aaea 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,7 +15,7 @@ Use `patch`, `minor` or `major`, or an exact version such as `0.2.0`. Each quote The script does the following: * Sets the version in all four manifests (`.claude-plugin/plugin.json`, `.cursor-plugin/plugin.json`, `openai/plugin.json` and `gemini-extension.json`) -* Adds a section for it at the top of `CHANGELOG.md`. That section becomes the GitHub release notes, so write it for people who use the plugin. You can still edit it before committing. +* Adds a section for it at the top of `CHANGELOG.md`. That section becomes the release notes on GitHub and in the OpenAI ZIP, so write it for people who use the plugin. You can still edit it before committing. ## 2. Open the pull request diff --git a/openai/plugin.json b/openai/plugin.json index 3eff574..4e4ccd5 100644 --- a/openai/plugin.json +++ b/openai/plugin.json @@ -94,8 +94,7 @@ "commerce": false }, "publication": { - "countries": [], - "release_notes": "First release of the Polar plugin: the Polar MCP server and skills for setup, integration, testing and migration." + "countries": [] } } }