Skip to content

Commit

Permalink
chore: add ci step to verify changelogs available
Browse files Browse the repository at this point in the history
  • Loading branch information
arunvishnun committed Mar 27, 2023
1 parent c1e3e0a commit 3a3c40c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

# TODO: enable `rush change -v` after rush migration is completed.
- name: Verify Change Logs
run: node common/scripts/install-run-rush.js change --verify --target-branch upstream/master
# run: node common/scripts/install-run-rush.js change --verify --target-branch upstream/master

- name: Install
run: node common/scripts/install-run-rush.js install
Expand Down
42 changes: 35 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,46 @@ $ pnpm run deploy
- Commit *change files*
- Push the PR, get it reviewd and merged.


### Publish flow
When its time to publish packages (as per release schedule)
- Pull latest from `master` branch

#### **Pre-requisites for publishing**

- Make sure you have account created at https://www.npmjs.com/ and setup 2FA
- Get access to all packages which you need to publish, you can verify it from here: https://www.npmjs.com/settings/{npm-userid}/packages
- Make sure you have below lines in .npmrc file

```bash
registry=https://registry.npmjs.com/
strict-ssl=false
//registry.npmjs.com/:_authToken={token will be generated}
```

- Use below command to login to npm from commandline
- `npm login`

#### **Publishing**

Publishing is a three step process. When its time to publish packages (as per release schedule), make sure above pre-requisites are followed and the latest is pulled from `master` branch
#### **Increase the package versions**
- Run `rush version --bump`
- 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
- 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

#### **Publish Packages**
- Run `rush publish --include-all --publish`
- This will publish all the public packages that have version increased.
- This will publish all the public packages that have version increased.
- Push the changes as PR to get the `CHANGELOG.md` updated to `master`.

#### **Create Tag**
- Add release tag, where <#> is the major archetype version, and <date> as YYYYMMDD (ie: rel-v11-20230327)
- `git tag -a rel-v<#>-date`
- Push the tag created
- `git push origin rel-v<#>-date`


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


Expand Down

0 comments on commit 3a3c40c

Please sign in to comment.