Skip to content

Commit

Permalink
docs: update package publishing process with rush (electrode-io#1933)
Browse files Browse the repository at this point in the history
* Publishtest (#7)

* feat: add a new test package for publish test

* chore: new package to test publish operation - commiting change files

* chore: bump versions [skip ci]

* docs: update package publishing process with rush

* chore: remove unused files

* chore: remove unused files

* chore: update shrinkwrap file
  • Loading branch information
arunvishnun committed Mar 22, 2023
1 parent 69f2013 commit 7c0234a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 24 deletions.
39 changes: 26 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,31 @@ $ cd docusaurus
$ pnpm run deploy
```

## Releasing

- Run `rush change` for any PRs with changes that needs to get released
This will provide an interactive screen to add Change description. Please provide details here about the changes you are making thorugh this PR
This will generate a change files in JSON format which are later used to generate changelogs
- Commit the generated change files (JSON).

> NOTE: Rush by default does NOT support conventional commits and developers needs to decide on the version bump (major/minor/patch).
Read more about [best practices]
### To publish
- https://rushjs.io/pages/maintainer/publishing/#dry-run-mode

## Process to publish packages

### Developer flow
- Developers commit all code changes.
- Run `rush change --target-branch <targetBranchWhichIsUsualyMaster>`
- This generates *change files*
- Commit *change files*
- Push the PR and get it reviewd and merged

### Publish flow
When its time to publish packages (as per release schedule)
- Pull latest from `master` branch
- Run `rush publish —apply`
- This is [dry run mode].
- Changes are added to the changelog files for each package.
- The `package.json` files are updated with new version numbers and written to disk. Nothing is actually committed to the source repository or published at this point
- Review the CHANGELOG.md updates at this point
- Run `rush publish --apply --target-branch main --publish --add-commit-details`
- This will create a branch with `publish-*`
- Publish the packages
- And finally checkout back to *target branch* (`master` in this case)
- Checkout to publish branch that got created above
- Push the changes as PR to get the `CHANGELOG.md` updated to `master`.

Read more about [rush publishing] and [best practices]


[prettier]: https://www.npmjs.com/package/prettier
Expand All @@ -132,3 +144,4 @@ Read more about [best practices]
[rushjs with pnpm]: https://rushjs.io/pages/maintainer/package_managers/
[best practices]: https://rushjs.io/pages/best_practices/change_logs/#recommended-practices
[pnpm]: https://pnpm.io/
[rush publishing]: https://rushjs.io/pages/maintainer/publishing/#dry-run-mode
28 changes: 18 additions & 10 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@
"shouldPublish": true,
"skipRushCheck": true
},

// Sample apps
{
"packageName": "poc-subapp",
Expand Down

0 comments on commit 7c0234a

Please sign in to comment.