Repository navigation
NAPP-173: merge the release PR before tagging and publishing - #168
Merged
Merged
Conversation
arunav-gandhi
requested changes
Oct 15, 2026
arunav-gandhi
left a comment
Contributor
There was a problem hiding this comment.
Added comments. Please check.
Adds prepare-release.yml, which opens the release/X.Y.Z PR with the version files and a drafted CHANGELOG entry as one GitHub-signed commit. Reworks release.yml to start on the squash merge into master: validate, test, then behind the approval gate create a draft GitHub Release on the merge commit, upload to Maven Central staging and publish the draft (which creates the tag). Newer runs for a version cancel older ones that have not started publishing, and a stale run refuses to publish. This matches the old Android release guides and the shared SDK release guide. Co-Authored-By: Claude <noreply@anthropic.com>
A manual Release run used to ship master's head, which can include changes merged after the release PR that were never reviewed as part of the release and are not in its CHANGELOG entry. It now releases the merge commit of the newest merged release/X.Y.Z PR (a correction PR, if there was one) and fails when there is no such PR, so a release can no longer skip Prepare release. Co-Authored-By: Claude <noreply@anthropic.com>
Review feedback: the header comments showed gh workflow run examples, which read as an invitation to start a release from a terminal. Both workflows now point to the Actions tab instead. The workflows themselves are unchanged. Co-Authored-By: Claude <noreply@anthropic.com>
Testing on a fork showed that GitHub holds the pull_request run of a PR opened by github-actions[bot] at "Approval required", and that a pr.yml run started with workflow_dispatch passes but is not shown on the PR. Prepare release now approves the held run, so the checks show on the release PR. Also drops the extra blank line after the drafted CHANGELOG entry, and stops using the whole commit message as the title of push-triggered Release runs. Co-Authored-By: Claude <noreply@anthropic.com>
Updating a draft Release without tag_name resets it to untagged-<hash>, after which the version lookup no longer finds the draft. Send tag_name on every update, find a draft by its title as well, and publish by release id. The superseded-run message now also says to start Release again if the newer run failed. Co-Authored-By: Claude <noreply@anthropic.com>
manigandanparthasarathi-okta
force-pushed
the
feature/NAPP-173
branch
from
October 16, 2026 07:18
28f2849 to
8989da1
Compare
arunav-gandhi
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructures the SDK release so the release PR is merged into master before anything is tagged or published, matching the existing Android release guides and the shared Guardian SDK Release Guide (AA1 1156121307). CI stays the main actor. Jira: NAPP-173.
Changes
prepare-release.yml(manual, on master,versioninput): validates the version (X.Y.Z, higher than the latest tag, not on Maven Central, no tag or GitHub Release yet), createsrelease/X.Y.Z, sets.versionand the README install line, drafts the CHANGELOG entry from the PRs merged since the previous tag, commits it as one GitHub-signed commit through the Git Data API, opens the "Release X.Y.Z" PR and approves the PR checks run that GitHub holds at "Approval required" for a PR opened by github-actions[bot], so the checks show on the PR (a dispatchedpr.ymlruns the tests but does not show on the PR). Re-runs are safe; once the release PR is merged and the version is not on Maven Central, it recreates the branch from master for a correction PR.release.yml: triggers on push to master and continues only when the commit is the squash merge of a release PR (so the run's ref is master, as a master-only environment policy expects); manual dispatch withversionfor re-runs, which releases the merge commit of the newest mergedrelease/X.Y.ZPR (never master's head) and fails if there is none, so a release cannot skip Prepare release. Jobs: validate, test, then publish behind themaven-central-releaseapproval gate. Publish creates a draft GitHub Release on the merge commit, uploads to Maven Central staging, then publishes the draft, which creates the tag. Promotion in the Portal stays manual.staging_droppedmoves the Release and tag and uploads again (the upload does not report its deployment ID, so CI cannot drop it).Not in this PR
The environment name: required reviewers currently sit on the
releaseenvironment, while the workflow usesmaven-central-release. That is being sorted out in OKTA-1296888 and will follow separately.Testing
actionlint is clean on both workflows. Both workflows were exercised end to end on a personal fork (dummy secrets, so nothing could reach Maven Central; for the success path the upload step was stubbed in a fork-only commit). Results:
.version, README and CHANGELOG, opens the PR and approves the held PR checks, which then show on the PR. A re-run with the PR open does nothing; after a closed PR it reuses the existing branch and opens a new PR; after a merge it recreates the branch from master for a correction PR whose diff holds only the fix. The CHANGELOG compare link uses the previous tag..versionbump fails validation before the gate. A merged release PR waits at the gate and the master-only branch policy accepts the run. A manual run releases the reviewed merge commit, not master's head. A newer run cancels an older one waiting at the gate, and approving a stale run is refused by the newest-run guard. A failed upload leaves only the draft; a re-run reuses and repairs it. The success path publishes the draft and puts the tag on the merge commit with the CHANGELOG entry as the body. A re-run on the same commit only prints the promote notice. A correction after an upload stops with the drop-in-the-Portal error, and a manual run withstaging_droppedmoves the Release and tag to the new merge commit.Two bugs found and fixed by this testing: a dispatched
pr.ymldoes not show on the PR (now the held run is approved instead), and updating a draft Release withouttag_nameresets it tountagged-...so the re-run could not find it (the tag name is now always sent and the draft is also matched by title).Still to do on the real repo: run Prepare release for the next patch version, merge, approve, let it upload to staging, then drop the deployment instead of promoting it.
🤖 Generated with Claude Code