Skip to content

Commit

Permalink
release process update (#6549)
Browse files Browse the repository at this point in the history
* release process update

* update
  • Loading branch information
jdevcs committed Oct 31, 2023
1 parent 41f39c0 commit 116b7bb
Showing 1 changed file with 34 additions and 12 deletions.
46 changes: 34 additions & 12 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,44 @@ Further details about versioning can be found in the [semver 2.0.0 specification
3. `yarn`: Verify all dependencies have been installed
4. Bump packages version numbers using `lerna version --no-push --no-private --no-git-tag-version` . This will update package versions and also run lifecycle scripts.
- It will prompt for new version , modify package metadata and run life cycle scripts (in our case `version`), for bootstrapping lerna will use underlying yarn.
5. Update the root and each package's `CHANGELOG.md`: Replace the `## [Unreleased]` header with new package version, and move `## [Unreleased]` header below listed changes
- For root `CHANGELOG.md` copy over all the listed changes for each package
5. Update each package's and also root `CHANGELOG.md`:

5.A. If there are any changes in package during release PR e.g. dependency updated that effects package, add entry in changelog under `## [Unreleased]` of that package's changelog.

5.B. For root `CHANGELOG.md` update, run command `yarn changelog sync`

5.C. Replace the `## [Unreleased]` header with new package version number, and move `## [Unreleased]` header below listed changes at end of file.

6. Run `yarn build:web` after lerna updates version and builds lib . This will bundle minified builds.
7. Commit the version bump changes and builds in release branch created in step 2
7. Commit the changelogs changes and version bump changes in release branch created in `Step 2`
8. `git tag bumped-version`: Tag the commit with bumped version having prefix `v` , e.g. `git tag v4.0.1-alpha.0`
9. `git push origin release/bumped-version`: Push release branch to `origin`
10. `git push origin --tags`: Push release tag created in `Step 8` to `origin`
11. Create a draft release on Github similar to [this](https://github.com/ChainSafe/web3.js/releases/tag/web3-providers-base%401.0.0-alpha.1)
- Check `This is a pre-release`
11. Create a draft release on Github similar to [this](https://github.com/web3/web3.js/releases/tag/v4.2.0)

- Select recently pushed tag in `choose a tag` drop down

- Check `Set as the latest release` if its latest release else select `This is a pre-release` if its not main release e.g. if its `RC` or `alpha`

- Check `Create a discussion for this release`

- In the release description, copy all entries in `CHANGELOG.md` for the version being released
12. Click `Save draft`
13. Open pull request to merge branch created in `Step 2` (`release/bumped-version`) into `4.x`
14. Wait for all tests to pass in github CI/CD , If there are any unusual warnings or errors in logs, discuss with team
15. When sufficient approvals have been met, publish draft release created in `Step 11`
16. Run `npx lerna publish from-package --ignore-scripts --dist-tag <<TAG>>` in the root directory to publish packages to NPM
- IMPORTANT: Replace `<<TAG>>` with required tag in above command, e.g. if publishing RC, use following command:

- Click `Save draft`

12. Open pull request to merge branch created in `Step 2` (`release/bumped-version`) into `4.x`
13. Wait for all tests to pass in github CI/CD , If there are any unusual warnings or errors in logs, discuss with team
14. When sufficient approvals have been met, publish draft release created in `Step 11`
15. Publish on NPM.
- login in NPM and verify you are logged in with right user and in right dir

- If you want to publish `latest` tag release, run `npx lerna publish from-package --ignore-scripts` in the root directory to publish packages to NPM.

- If you want to publish any other tag, run `npx lerna publish from-package --ignore-scripts --dist-tag <<TAG>>` in the root directory e.g. `rc`

IMPORTANT: Replace `<<TAG>>` with required tag in above command, e.g. if publishing `RC`, use following command:
`npx lerna publish from-package --ignore-scripts --dist-tag rc`

- lerna will not invoke life cycle scripts before publishing and this will publish all packages to NPM public registry.
17. Finally if all of above steps are completed successfully, merge release PR into `4.x` branch.

16. After publishing logout from npm and finally if all of above steps are completed successfully, merge release PR into `4.x` branch.

0 comments on commit 116b7bb

Please sign in to comment.