Skip to content

Commit

Permalink
Update publishing.md (#2283)
Browse files Browse the repository at this point in the history
* Update publishing.md

Switch to ordered list, add tag fetching, add earlier generation of CHANGELOG

* fix: format
  • Loading branch information
vpicone authored and tw15egan committed Apr 10, 2019
1 parent 6c84a2c commit c975a3b
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,31 @@

You can publish a release of `carbon-components` by following these steps:

- Verify that you are on `master` and are up-to-date by running `git pull upstream master`
- This assumes you have setup `upstream` pointed towards `carbon-components`
- Create a new branch called `release/vX.Y.Z` where `X.Y.Z` is the version you
would like to publish
- Update the `version` field in `package.json` to the version you used above
- Commit this version change with the commit message: `vX.Y.Z`
- Create a Pull Request and request reviewers
- After the Pull Request has been approved, merge into master
- Now you can publish the package to `npm`. Do this you can run the following
command for a dry run:
- `npm publish . --dry-run`
- If you need to tag this package, you can use the `--tag` flag, for example:
- `npm publish . --tag next`
- If the changes look good to go, you can run the following command to publish:
- `npm publish .`
- After the package is published, you should create a git tag by running:
- `git tag vX.Y.Z`
- You can then push this tag upstream by running:
- `git push upstream vX.Y.Z`
- After pushing the tag upstream, you should see the tag appear under
[releases](https://github.com/IBM/carbon-components/releases)
- Edit the tag under releases with our CHANGELOG format, you can get the most
recent changelog by running the following command and viewing the generated
`CHANGELOG.md` file:
- `npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0`
- After updating the release on GitHub, you should be good to go! Congrats on
the release!!! <span aria-label="celebrate">🎉</span>
1. Verify that you are on `master` and are up-to-date by running:
- `git pull upstream master && git fetch upstream --tags`
- This assumes you have setup `upstream` pointed towards `carbon-components`
1. Create a new branch called `release/vX.Y.Z` where `X.Y.Z` is the version you
would like to publish
1. Update the `version` field in `package.json` to the version you used above
1. Commit this version change with the commit message: `vX.Y.Z`
1. Create a pull Request and request reviewers
1. Run the following command and include the latest changes in your pull request
- `npx conventional-changelog-cli -p angular -i CHANGELOG.md -s -r 0`
- If the the release range is off, ensure you fetched the upstream tags (step 1)
1. After the pull Request has been approved, merge into master
1. Now you can publish the package to `npm`. Do this you can run the following
command for a dry run:
- `npm publish . --dry-run`
1. If you need to tag this package, you can use the `--tag` flag, for example:
- `npm publish . --tag next`
1. If the changes look good to go, you can run the following command to publish:
- `npm publish .`
1. After the package is published, you should create a git tag by running:
- `git tag vX.Y.Z`
1. You can then push this tag upstream by running:
- `git push upstream vX.Y.Z`
1. After pushing the tag upstream, you should see the tag appear under
[releases](https://github.com/IBM/carbon-components/releases)
1. Edit the tag under releases to include the changelog from your pull request (step 6)
1. After updating the release on GitHub, you should be good to go! Congrats on
the release!!! <span aria-label="celebrate">🎉</span>

0 comments on commit c975a3b

Please sign in to comment.