Skip to content

ci: atomic release publish hard-gated on OpenUPM signing - #16

Merged
IvanMurzak merged 1 commit into
mainfrom
ci/atomic-release-signing
May 24, 2026
Merged

IvanMurzak merged 1 commit into
mainfrom
ci/atomic-release-signing

Conversation

@IvanMurzak

Copy link
Copy Markdown
Owner

Summary

Restructures release.yml so the GitHub Release is created as a single atomic publish gated on every prerequisite. Mirrors the parent Unity-MCP repo changes (#776 + #777 combined).

  • prepare-release-notes (new): generates release.md (preserving the # Package $version header) in parallel with tests/builds and uploads it as the release-notes artifact.
  • build-signed-upm-package (new): signs com.ivanmurzak.unity.mcp.particlesystem (Unity-Package/Assets/root) with Unity's UPM CLI, verifies attestation + the com.ivanmurzak.unity.mcp.particlesystem- basename prefix, and uploads the signed .tgz. HARD GATE — not continue-on-error; missing signing secrets ::error:: + exit 1.
  • release-unity-plugin (rewritten): downloads the release-notes, unity-installer-package, and signed-upm-package artifacts and creates the Release + tag in a single softprops/action-gh-release@v2 call with body_path + fail_on_unmatched_files: true. Inline release-notes generation removed; unused success/release_notes outputs dropped.
  • publish-unity-installer removed; cleanup-artifacts re-pointed at release-unity-plugin and now also deletes signed-upm-package and release-notes.
  • All existing Unity test jobs (editmode + playmode + standalone) preserved unchanged.
  • Adds docs/openupm-signing.md.

⚠️ Action required before next release

This workflow is hard-gated on signing. Three repo secrets MUST be configured on IvanMurzak/Unity-AI-ParticleSystem or the next release will hard-fail with no Release created:

gh secret set UPM_SERVICE_ACCOUNT_KEY_ID     --repo IvanMurzak/Unity-AI-ParticleSystem
gh secret set UPM_SERVICE_ACCOUNT_KEY_SECRET --repo IvanMurzak/Unity-AI-ParticleSystem
gh secret set UPM_ORG_ID                     --repo IvanMurzak/Unity-AI-ParticleSystem

See docs/openupm-signing.md for the full one-time setup (including the openupm/openupm trackingMode: githubRelease listing change).

Test plan

  • python -c "import yaml; ..." structural validation passes (jobs present/absent, needs wired, no continue-on-error on the signed-package job).
  • No remaining publish-unity-installer / .outputs.success / .outputs.release_notes references.
  • Configure the three UPM signing secrets on this repo.
  • Confirm next release attaches both the .unitypackage and com.ivanmurzak.unity.mcp.particlesystem-<version>.tgz.

Closes #15

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 24, 2026 00:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the release workflow so the GitHub Release is published as a single atomic step that is hard-gated on all prerequisites, including building and verifying a signed OpenUPM UPM tarball.

Changes:

  • Adds prepare-release-notes job to generate release.md early and publish it as a release-notes artifact.
  • Adds build-signed-upm-package job to sign + verify the UPM package and upload it as a signed-upm-package artifact (hard gate).
  • Rewrites release-unity-plugin to download all artifacts and create the Release + tag in one softprops/action-gh-release@v2 call; updates cleanup accordingly and adds OpenUPM signing setup docs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/release.yml Adds parallel release-notes + signed-package jobs and switches release publication to a single atomic release step gated on all prerequisites.
docs/openupm-signing.md Documents the one-time OpenUPM/Unity org setup and explains the hard-gated signing/release flow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +254 to +259
archive_entries="$(tar -tzf "$archive")"
grep -qx 'package/package.json' <<<"$archive_entries"
grep -qx 'package/.attestation.p7m' <<<"$archive_entries"

printf 'Signed archive: %s\n' "$archive_basename"
tar -xOzf "$archive" package/package.json | jq '{name, version}'
exit 1
fi

archive="${archives[0]}"
Comment on lines +221 to +225
- name: Install Unity UPM CLI
run: |
curl -fsSL https://cdn.packages.unity.com/upm-cli/install.sh -o install.sh
bash install.sh
echo "$HOME/.upm/bin" >> "$GITHUB_PATH"
Comment on lines +85 to +91
username=$(gh api repos/${GITHUB_REPOSITORY}/commits/$sha --jq '.author.login // .commit.author.name' 2>/dev/null || true)
if [ -z "$username" ]; then
username=$(git log -1 --pretty=format:'%an' $sha)
fi
message=$(git log -1 --pretty=format:'%s' $sha)
short_sha=$(git log -1 --pretty=format:'%h' $sha)
echo "- [\`$short_sha\`]($repo_url/commit/$sha) — $message by @$username" >> release.md
@IvanMurzak
IvanMurzak merged commit 5217df3 into main May 24, 2026
55 checks passed
@IvanMurzak
IvanMurzak deleted the ci/atomic-release-signing branch May 24, 2026 00:58
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.

Restructure release workflow for atomic publish + OpenUPM signing

2 participants