Skip to content

ci: run GitHub release via semver postTarget#762

Merged
dianjuar merged 1 commit into
mainfrom
ci/semver-github-release-posttarget
May 31, 2026
Merged

ci: run GitHub release via semver postTarget#762
dianjuar merged 1 commit into
mainfrom
ci/semver-github-release-posttarget

Conversation

@dianjuar
Copy link
Copy Markdown
Member

@dianjuar dianjuar commented May 31, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What is the current behavior?

Publishment runs npx nx github ngx-deploy-npm as a separate workflow step after ad-m/github-push-action. The github target options use {tag} and {notes}, but those placeholders are only interpolated when github runs as a version postTarget. The standalone step passed literal {tag} to gh release create, producing a broken release (e.g. tag name {tag}).

Issue Number: N/A (follow-up to #761 / #244)

What is the new behavior?

  • Add github back to the version postTargets with push: true and noVerify: true so semver interpolates {tag} / {notes} and runs gh release create during nx version.
  • Pass GITHUB_BOT_TOKEN as GITHUB_TOKEN on the version step for gh.
  • Remove the redundant "Create GitHub Release" workflow step.
  • Keep ad-m/github-push-action after tagging last-release for force push of branch and tags to protected main.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • Ensure repo secret GITHUB_BOT_TOKEN (fine-grained PAT) is configured with Contents: Read and write and the bot user is on the main branch protection bypass list.
  • GIT_BOT_TOKEN remains used for checkout and ad-m/github-push-action.

Test plan

  • Merge and run publishment on main (or dry-run npx nx version ngx-deploy-npm --dry-run on a branch).
  • Confirm the GitHub release uses the real tag (e.g. ngx-deploy-npm-X.Y.Z) and changelog notes, not {tag}.
  • Confirm npm publish and git push to main still succeed.

Wire github back into version postTargets so {tag} and {notes} are
interpolated, enable semver push with noVerify, and use GITHUB_BOT_TOKEN
for gh release create during publishment.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link
Copy Markdown

Release preview

Simulates squash merge into main using the PR title as the commit message.
Only changes under packages/ngx-deploy-npm affect the version.

PR title: ci: run GitHub release via semver postTarget

Semantic commit (PR title)

✅ Valid conventional commit

Version

9.2.09.2.1

Changelog preview

## [9.2.1](https://github.com/bikecoders/ngx-deploy-npm/compare/ngx-deploy-npm-9.2.0...ngx-deploy-npm-9.2.1) (2026-05-31)

Generated by CI (PR Release Preview). Actual release runs on merge via publishment.yml.

Notes: Preview uses only the PR title (squash merge). Changes outside packages/ngx-deploy-npm do not trigger a version bump. Breaking changes must appear in the title (e.g. feat!:), not only in the PR description.

@sonarqubecloud
Copy link
Copy Markdown

@dianjuar dianjuar merged commit f478e2f into main May 31, 2026
33 checks passed
@dianjuar dianjuar deleted the ci/semver-github-release-posttarget branch May 31, 2026 05:27
dianjuar added a commit that referenced this pull request Jun 2, 2026
fix(ci): use GIT_BOT_TOKEN for gh release auth in publishment

PR #762 referenced a non-existent GITHUB_BOT_TOKEN secret, which left
GITHUB_TOKEN empty during the semver github postTarget and broke release
creation after npm publish.

Co-authored-by: Cursor <cursoragent@cursor.com>
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