-
Notifications
You must be signed in to change notification settings - Fork 10
Combine release workflows into one file #448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this 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 consolidates three separate GitHub Actions workflow files for releasing different versions (main, canary, and release candidate) into a single unified workflow file. The changes streamline the release process by reducing workflow file duplication and modernizing the configuration.
Key changes:
- Removes two standalone workflow files (
release_canary.ymlandrelease_candidate.yml) and merges their functionality intorelease.ymlas separate jobs - Updates Node.js version from 20 to 24 and actions/setup-node from v4 to v6
- Adds enhanced security with OIDC permissions and improved concurrency control
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/release_candidate.yml |
Deleted file - functionality moved to release.yml |
.github/workflows/release_canary.yml |
Deleted file - functionality moved to release.yml |
.github/workflows/release.yml |
Consolidated all release workflows into a single file with separate jobs for main, canary, and candidate releases |
| - name: Publish canary version | ||
| run: | | ||
| echo "$( jq '.version = "0.0.0"' package.json )" > package.json | ||
| echo -e "---\n'eslint-plugin-primer-react': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md | ||
| npx changeset version --snapshot | ||
| npx changeset publish --tag canary |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The canary release job is missing NPM authentication configuration. The original release_canary.yml workflow included a 'Create .npmrc' step that set up NPM_AUTH_TOKEN_SHARED for publishing. Without this authentication, the 'npx changeset publish' command on line 72 will likely fail.
| - name: Publish release candidate | ||
| run: | | ||
| version=$(jq -r .version package.json) | ||
| echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" package.json )" > package.json | ||
| yarn publish --tag next |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release candidate job is missing NPM authentication configuration. The original release_candidate.yml workflow included a 'Create .npmrc' step that set up NPM_AUTH_TOKEN_SHARED for publishing. Without this authentication, the 'yarn publish' command on line 121 will likely fail.
| run: | | ||
| version=$(jq -r .version package.json) | ||
| echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" package.json )" > package.json | ||
| yarn publish --tag next |
Copilot
AI
Nov 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'yarn publish' is inconsistent with the rest of the workflow which uses npm commands (npm ci, npm run build). The canary job on line 72 uses 'npx changeset publish' which is the correct approach. This should be changed to use npm/npx for consistency and to properly leverage the changeset tooling already in use.
| yarn publish --tag next | |
| npx changeset publish --tag next |
https://github.com/github/primer/issues/6015#issuecomment-3481838782