Skip to content
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

feat(deps): update action from node16 to node20 #995

Merged
merged 2 commits into from Aug 21, 2023

Conversation

MikeMcC399
Copy link
Collaborator

@MikeMcC399 MikeMcC399 commented Aug 16, 2023

BREAKING CHANGE:

This PR migrates the Cypress JavaScript GitHub Action cypress-io/github-action to run under node20 instead of under node16. This is a BREAKING CHANGE.

Strategy

node20 is provided as an option in GitHub runners through release v2.308.0 from August 14, 2023. The release notes say:

Actions Runner follows a progressive release policy, so the latest release might not be available to your enterprise, organization, or repository yet.

In practice this means that GitHub-hosted runners pick up the new version within a few days whilst GitHub self-hosted runners may take longer. The GitHub documentation runs.using has yet to be updated to list node20 as an option (status Aug 16, 2023).

Changes made to migrate to node20 are kept to the minimum to reduce migration risks. Related updates, such as migrating npm package-lock.json files from lockfileVersion 2 to 3 are deferred.

Initially, the documentation for cypress-io/github-action will continue to recommend using v5 whilst offering v6 for "early adopter" users needing node20 support.

Since Node.js 16 plans to transition into end-of-life on September 11, 2023, this may then be a convenient time to change the recommended action version from v5 to v6, updating the documentation accordingly.

@cypress-app-bot
Copy link

@MikeMcC399

This comment was marked as resolved.

@MikeMcC399 MikeMcC399 force-pushed the migrate/node20 branch 2 times, most recently from b7d57d5 to 7a0fe46 Compare August 16, 2023 13:04
@MikeMcC399 MikeMcC399 marked this pull request as ready for review August 16, 2023 13:12
@MikeMcC399

This comment was marked as outdated.

BREAKING CHANGE:

Update action from node16 to node20
update @types/node to 20.5.0
Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

Is the version to be published pulled from the changelog? I am not too familiar with the semantic release action. Or do we need to semver a breaking change in the commit @chrisbreiding ?

@chrisbreiding
Copy link

Looks like the action uses semantic-release, so the standard commit format for a breaking change will work.

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Aug 19, 2023

@AtofStryker

The release process is described in the CONTRIBUTING document. There is a separate section on Merging pull requests.

Is the version to be published pulled from the changelog?

No. The content of CHANGELOG.md has no influence on which version is used for the release.

I am not too familiar with the semantic release action. Or do we need to semver a breaking change in the commit?

The commit affa1e6 in this PR already includes the BREAKING CHANGE: notation:

image

I ran this PR through a copy of this repo and it successfully created a new major version 6.0.0, so it should work if you just Squash and Merge it.

@AtofStryker
Copy link
Contributor

@MikeMcC399 squashing and merging usually grabs the PR title, but I believe the commit would still be in the footer so it should work. Do we want to rebase merge to be sure or do you feel it's unnecessary?

@MikeMcC399
Copy link
Collaborator Author

MikeMcC399 commented Aug 21, 2023

@AtofStryker

squashing and merging usually grabs the PR title, but I believe the commit would still be in the footer so it should work. Do we want to rebase merge to be sure or do you feel it's unnecessary?

There are different options in a repo as to how squash and merge is set up and they aren't visible to me as Contributor, however when you click on Squash and Merge it shows you what the commit looks like before you execute it. To be doubly sure, just check that it has BREAKING CHANGE: in the body, but I think anyway @semantic-release/commit-analyzer will parse the attached commit correctly.

image

If it's not already set, then "Default to pull request title and commit details" is a good option in Settings > General for the repo.

I don't think a rebase merge is necessary, although again as a Contributor I never get to personally do any commits into the master branch, so I can only comment theoretically!

Here's what it looked like in my test repo:

[11:30:32 AM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[11:30:32 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analyzing commit: feat(deps): update action from node16 to node20 (#11)

BREAKING CHANGE:

Update action from node16 to node20
update @types/node to 20.5.0
[11:30:32 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The release type for the commit is major
[11:30:32 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 3 commits complete: major release
[11:30:32 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[11:30:32 AM] [semantic-release] › ℹ  The next release version is 6.0.0

@AtofStryker AtofStryker merged commit a55856e into cypress-io:master Aug 21, 2023
115 checks passed
@AtofStryker
Copy link
Contributor

@MikeMcC399 just merged in with commit messages on. Will try to monitor the job to verify release!

@github-actions
Copy link

🎉 This PR is included in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MikeMcC399
Copy link
Collaborator Author

@AtofStryker

Many thanks! It all went as planned! 🚀 💪🏻

@MikeMcC399 MikeMcC399 deleted the migrate/node20 branch August 21, 2023 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release github-action for Node.js node20
4 participants