Add manually-triggered GitHub Actions release workflow#702
Open
duanemay wants to merge 1 commit into
Open
Conversation
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>
There was a problem hiding this comment.
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.ymlwith aworkflow_dispatchinput to selectmajor/minor/patch. - Automates
npm ci, build, version bump (commit + tag), push tomain,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: |
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
Ports the Concourse
publish-minor/minor-bumpjobs (concourse/uaa-singular/pipeline.ymlinuaa-ci) to a self-contained GitHub Actions workflow (.github/workflows/release.yml), following the sameworkflow_dispatchpattern already used inuaa-cli'srelease.yml.A maintainer triggers it manually from the Actions tab, picking
major/minor/patch. It then:npm ci && npm run buildnpm version <bump>— bumpspackage.json/package-lock.json, commits, and tags locallymainnpm publishDifferences from the Concourse version, and why:
package.json's current version, rather than an external AWS S3-backed semver counter we don't have credentials for.package.jsonand existing git tags are already in sync at1.47.0, so this is a reliable source of truth going forward.drafts: true).github-actions[bot]identity for the version-bump commit instead of the old Concourse-specificcf-identity-eng@pivotal.ioidentity.main(confirmed via the GitHub API), so a direct push from the workflow will succeed.Setup required before this can actually publish
An
NPM_TOKENsecret needs to be added under repo Settings → Secrets and variables → Actions (only a repo admin can do this).Test plan
package.json's version and existing git tags are in sync (1.47.0), so bumping frompackage.jsonwon't produce a version mismatchmainNPM_TOKENis configured (can't fully test without publishing a real version)🤖 Generated with Claude Code