Skip to content

Add manually-triggered GitHub Actions release workflow#702

Open
duanemay wants to merge 1 commit into
mainfrom
release-workflow
Open

Add manually-triggered GitHub Actions release workflow#702
duanemay wants to merge 1 commit into
mainfrom
release-workflow

Conversation

@duanemay

@duanemay duanemay commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Ports the Concourse publish-minor/minor-bump jobs (concourse/uaa-singular/pipeline.yml in uaa-ci) to a self-contained GitHub Actions workflow (.github/workflows/release.yml), following the same workflow_dispatch pattern already used in uaa-cli's release.yml.

A maintainer triggers it manually from the Actions tab, picking major/minor/patch. It then:

  1. npm ci && npm run build
  2. npm version <bump> — bumps package.json/package-lock.json, commits, and tags locally
  3. Pushes the commit and tag to main
  4. npm publish
  5. Creates a GitHub Release for the new tag with auto-generated notes

Differences from the Concourse version, and why:

  • Version is bumped directly off package.json's current version, rather than an external AWS S3-backed semver counter we don't have credentials for. package.json and existing git tags are already in sync at 1.47.0, so this is a reliable source of truth going forward.
  • The GitHub Release is published immediately rather than created as a draft (Concourse used drafts: true).
  • Uses the standard github-actions[bot] identity for the version-bump commit instead of the old Concourse-specific cf-identity-eng@pivotal.io identity.
  • No branch protection exists on main (confirmed via the GitHub API), so a direct push from the workflow will succeed.

Setup required before this can actually publish

An NPM_TOKEN secret needs to be added under repo Settings → Secrets and variables → Actions (only a repo admin can do this).

Test plan

  • Confirmed package.json's version and existing git tags are in sync (1.47.0), so bumping from package.json won't produce a version mismatch
  • Confirmed no branch protection blocks a direct push to main
  • Dry-run once NPM_TOKEN is configured (can't fully test without publishing a real version)

🤖 Generated with Claude Code

Ports the Concourse "publish-minor"/"minor-bump" jobs
(concourse/uaa-singular/pipeline.yml in uaa-ci) to a self-contained
GitHub Actions workflow, following the same workflow_dispatch pattern
already used in uaa-cli's release.yml.

Differences from the Concourse version:
- Version is bumped directly off package.json's current version via
  `npm version <major|minor|patch>` (input-selectable), rather than an
  external AWS S3-backed semver counter we don't have credentials for.
  package.json and git tags are already in sync (1.47.0), so this is a
  reliable source of truth going forward.
- The GitHub Release is published immediately rather than created as
  a draft.
- Uses the standard github-actions[bot] identity for the version-bump
  commit instead of the old Concourse-specific cf-identity-eng
  identity.

Requires an NPM_TOKEN secret to be added under repo settings before
this can actually publish.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 10, 2026 22:58

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

Adds a manually triggered GitHub Actions workflow to cut npm releases and create GitHub Releases, replacing the old Concourse-based release process described in the PR.

Changes:

  • Introduces .github/workflows/release.yml with a workflow_dispatch input to select major/minor/patch.
  • Automates npm ci, build, version bump (commit + tag), push to main, npm publish, and GitHub Release creation.

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

Comment on lines +18 to +23
release:
name: Publish to npm and create GitHub Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
Comment on lines +43 to +55
- name: Bump version, tag, and push
id: bump
run: |
NEW_VERSION=$(npm version "${{ github.event.inputs.release_type }}")
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
git push origin main
git push origin "${NEW_VERSION}"

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Comment on lines +16 to +17

jobs:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants