Skip to content

Auto-create GitHub Release + archive mirror on tag push#5

Merged
C-K-Loan merged 1 commit into
mainfrom
chore/release-automation-workflows
Apr 18, 2026
Merged

Auto-create GitHub Release + archive mirror on tag push#5
C-K-Loan merged 1 commit into
mainfrom
chore/release-automation-workflows

Conversation

@C-K-Loan

Copy link
Copy Markdown
Contributor

Summary

Automates the last manual steps of each release.

What changes in publish.yml

On every v* tag push, in addition to the existing PyPI publish:

  1. Extract release notes from CHANGELOG.md — finds the matching ## [X.Y.Z] section
  2. Create GitHub Release via softprops/action-gh-release@v2 — uses extracted notes as body, marks latest
  3. Mirror to archive — force-push public/main to archive/public-main and push the tag. Runs only if ARCHIVE_PUSH_TOKEN secret is set (no-op otherwise).

One-time setup (after merge)

Set ARCHIVE_PUSH_TOKEN secret in this repo's Settings → Secrets → Actions. Value: a fine-grained PAT with Contents: write on ghost-in-the-droid/android-agent-archive only.

Without that token, the mirror-to-archive job skips gracefully (does not fail the workflow).

Test plan

  • YAML syntax valid
  • CHANGELOG extraction Python script tested on local v1.1.0 / v1.2.0 sections
  • End-to-end test: will be validated on the v1.3.0 tag push (first actual use)

Docs

docs/RELEASE.md updated with the new one-command flow and GitHub Secrets setup table.

publish.yml now does 3 things on v* tag:
1. Publish to PyPI (existing)
2. Extract CHANGELOG section for this version → create GitHub Release
   via softprops/action-gh-release@v2
3. Force-push public/main + tag to android-agent-archive repo
   (mirror-to-archive job, conditional on ARCHIVE_PUSH_TOKEN secret)

Also sync docs/RELEASE.md with private mirror — new simpler flow:
./scripts/release.sh X.Y.Z → merge PR → tag → automation handles PyPI +
GitHub Release + archive sync.

Adds permissions: contents: write on publish job (required for
auto-creating releases).
@C-K-Loan C-K-Loan merged commit 1cfbb21 into main Apr 18, 2026
4 checks passed
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