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

Automate Release (Core) #2574

Merged
merged 28 commits into from
Sep 28, 2023
Merged

Automate Release (Core) #2574

merged 28 commits into from
Sep 28, 2023

Conversation

yscik
Copy link
Contributor

@yscik yscik commented Sep 11, 2023

Changes proposed in this Pull Request

  • Add an npm run release <version> command
  • Adapt Sensei's release script to prepare a new release, bump versions, replace placeholders
  • Create provisional changelog based on new 'Release Notes' section in every PR for the version's milestone
  • Create release PR
  • Add an action triggered by merging a PR from a release/* branch, that writes the final changelog entry, creates and tags a new release on GH, then deploys it to WordPress.org

Testing instructions

Usage docs

  • GitHub CLI is required for the initial release command. Use gh auth login the first time to set it up
  • Release will be done from the current branch, which usually should be an up-to-date trunk
  • A milestone needs to be set up for the version being released, and merged non-maintenance PRs should be included in it

@yscik yscik requested review from a team September 11, 2023 22:18
@yscik yscik changed the title Automate Release Automate Release (Core) Sep 19, 2023
Copy link
Member

@fjorgemota fjorgemota left a comment

Choose a reason for hiding this comment

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

This is looking good!

I added some comments after reading the code a bit.

Thanks!

scripts/prepare-release.mjs Show resolved Hide resolved
.github/PULL_REQUEST_TEMPLATE.md Show resolved Hide resolved
node scripts/create-release.mjs wp-job-manager ${{ github.event.number }}
unzip -q wp-job-manager.zip
- name: Deploy to WordPress.org
uses: 10up/action-wordpress-plugin-deploy@stable
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be cool to use a fork inside the Automattic org for this.

Just to avoid possible security issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

10up is a pretty reputable company and an Automattic partner, so I think it should be safe enough / not worth maintaining a fork.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is @stable the latest version? Would it be possible to at least use a specific version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pinned this down to a commit hash in e1cf715

package.json Outdated Show resolved Hide resolved
@fjorgemota fjorgemota self-requested a review September 22, 2023 23:19
console.log( `-----------------------------` );
console.log( `Pull requests to include (milestone ${ newVersion }):` );

execSync( ghPrs, { stdio: 'inherit' } );
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I miss something but I think this doesn't do anything

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one should just output the list of PRs directly to the console.

Copy link
Contributor

@gikaragia gikaragia left a comment

Choose a reason for hiding this comment

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

Good stuff! I think I found a couple of minor issues.

@yscik yscik merged commit ad76103 into trunk Sep 28, 2023
8 checks passed
@yscik yscik deleted the add/release-script branch September 28, 2023 14:30
@yscik yscik added the [Type] Maintenance Changes to non-production files label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Maintenance Changes to non-production files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants