Skip to content

Conversation

@jonrohan
Copy link
Member

@jonrohan jonrohan commented Nov 6, 2025

Overview

This PR refactors the release workflow to use centralized GitHub Actions from the primer/.github repository instead of maintaining local copies. This change improves maintainability and ensures consistency across Primer repositories.

Key Changes:

  1. Migrated to centralized actions: Replaced local .github/actions/upload-versions action with primer/.github/.github/actions/upload-versions@v2.4.0
  2. Added version reporting: Introduced primer/.github/.github/actions/report-versions@v2.4.0 to replace inline GitHub script for outputting version information
  3. Fixed workflow trigger issue: Added filters to prevent the workflow from running on tag pushes and merge queue branches, which was causing the release-main job to be skipped

Changelog

New

  • Added primer/.github/.github/actions/report-versions@v2.4.0 action to the release-candidate and release-canary jobs
  • Added workflow trigger filters to ignore merge queue branches (gh-readonly-queue/**) and all tags

Changed

  • Updated all jobs to use primer/.github/.github/actions/upload-versions@v2.4.0 instead of local action
  • Replaced inline github-script actions for outputting version information with the centralized report-versions action

Removed

  • Removed local .github/actions/upload-versions/action.yml file (41 lines)
  • Removed inline GitHub script actions that created commit statuses for published versions in release-candidate and release-canary jobs

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Reason: This is a CI/CD infrastructure change that does not affect the published package or its API. It only affects internal release workflow processes.

Testing & Reviewing

Testing:

  • The workflow changes can be verified by checking that the release workflow runs correctly on pushes to the main branch
  • The release-main job should now run on main branch pushes (previously was being skipped due to tag triggers)
  • Version reporting should work correctly via the new report-versions action
  • Version uploads should continue to work as before via the centralized upload-versions action

Key Points to Review:

  1. The centralized actions from primer/.github@v2.4.0 provide equivalent functionality to the removed local action and inline scripts
  2. The workflow trigger filters correctly exclude tags and merge queue branches to prevent unnecessary runs
  3. All three jobs (release-main, release-candidate, release-canary) have been updated consistently

Merge checklist

Note: Most merge checklist items are not applicable for this CI/CD infrastructure change. The changes are SSR compatible as they don't affect runtime code.

@changeset-bot
Copy link

changeset-bot bot commented Nov 6, 2025

⚠️ No Changeset found

Latest commit: a69ed98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jonrohan jonrohan added the skip changeset This change does not need a changelog label Nov 6, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-7156 November 6, 2025 21:54 Inactive
@jonrohan jonrohan changed the title Update upload versions script Update release workflow to use upload-versions from the primer/.github repository Nov 6, 2025
@jonrohan jonrohan marked this pull request as ready for review November 6, 2025 22:03
@jonrohan jonrohan requested a review from a team as a code owner November 6, 2025 22:03
@jonrohan jonrohan enabled auto-merge November 6, 2025 22:03
@github-actions github-actions bot requested a deployment to storybook-preview-7156 November 6, 2025 22:03 Abandoned
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR migrates the release workflow from using a local GitHub Action (.github/actions/upload-versions) to using centralized shared actions from the primer/.github repository. It also adds filtering to prevent the workflow from running on merge queue branches and tags.

  • Replaces local upload-versions action with shared actions from primer/.github@v2.4.0
  • Adds new report-versions step to replace custom GitHub Script implementations for reporting package versions
  • Adds workflow trigger filters to ignore merge queue branches and tags

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/release.yml Updated to use shared actions from primer/.github@v2.4.0 for version reporting and uploading; added branch/tag filtering to workflow triggers; removed custom GitHub Script steps
.github/actions/upload-versions/action.yml Deleted local action as it's replaced by the centralized shared action

@jonrohan jonrohan added this pull request to the merge queue Nov 7, 2025
Merged via the queue into main with commit 5723ccc Nov 7, 2025
56 checks passed
@jonrohan jonrohan deleted the update_upload_versions branch November 7, 2025 00:22
pksjce pushed a commit that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants