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

docs: update release process guide #3161

Merged
merged 3 commits into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 35 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,23 +125,38 @@ Here are some things to keep in mind as you file pull requests to fix bugs, add
- If you are continuing the work of another person's PR and need to rebase/squash, please retain the
attribution of the original author(s) and continue the work in subsequent commits.

### Release process

- Make sure the tests pass with `yarn test`
- Run `git clean -fdx` - this will ensure unneeded build files (and potentially sensitive files) are not included in the npm package.
- Ensure that you are logged into npm via command line (`npm login`)
- Run `yarn lerna:publish`, which will run the `lerna publish` command with a necessary set of flags.
- The script will then ask you for your `npm` OTP password.
- The script will commit the changes automatically. Run `git log` to confirm that the changes have been
committed.
- The command will have published your packages to `npm`, and pushed an appropriate tag to github.
- After running the command, you should have a commit which:
- Updates the version field in the package.json file
- Updates the version fields in each of the submodule package.json files
- Push your commit upstream to the main/default branch.
- Create a new github release
- Go to releases tab
- Draft a new release and choose the appropriate tag
- Target default branch
- Generate release notes by copying in CHANGELOG.md contents into the release description or use
GitHub's [automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
## Release process

This guide is for maintainers who have:

- Push access to the `electron/forge` repository.
- Collaborator access to the `@electron-forge` packages on npm.

### 1. Prepare your local code checkout

- Switch to the tip of the `main` branch with `git switch main && git pull`.
- Run tests locally with `yarn test`.
- Check that the latest CI run passed on `main` on [GitHub](https://github.com/electron/forge/actions?query=workflow:CI).
- Remove all untracked files and directories from your checkout with `git clean -fdx`.
- Install dependencies with `yarn install`.

### 2. Publish all npm packages

- Log into npm with `npm login`.
- Run the `yarn lerna:publish` command.
- Enter your npm account's time-based one-time password (TOTP).

The `lerna:publish` script will automatically increment the next package version based on the
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. From there, it does two things:

1. It creates a tagged commit that bumps the version number in `package.json` at the root and package levels
and pushes the commit and tag to GitHub.
1. It publishes every `@electron-forge/` package to npm.

### 3. Publish release to GitHub

- Go to the repo's [New Release](https://github.com/electron/forge/releases/new) page.
- Select tag you just published.
- Target the `main` branch.
- [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
against the previous Forge release.