Skip to content

Commit

Permalink
Merge pull request #47 from MetroStar/CSG-632
Browse files Browse the repository at this point in the history
CSG-632: Final Cleanup/Review of Comet Projects
  • Loading branch information
jbouder committed Jun 6, 2023
2 parents be21ad3 + 60039a3 commit 581e3db
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 11 deletions.
9 changes: 2 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ npm run lint
npm run format
```

## Publishing to NPM
## Releasing packages

To publish a package to NPM, run the following:

```sh
npm run build:[SOME PACKAGE]
npm publish
```
See the following for creating a new release: [Releasing](https://github.com/MetroStar/comet/blob/main/RELEASING.md)
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Comet
<p style="text-align: center;">
<picture>
<img alt="Comet Component Library" src="https://raw.githubusercontent.com/MetroStar/comet/main/images/comet-logo.png" width="100%">
</picture>
</p>

<br/>

Comet is a React with TypeScript Component Library based on USWDS.

Expand Down
37 changes: 37 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Releasing new versions of packages

Note: currently full releases are tied to the main `comet-uswds` package.

## Releasing a new version of comet-uswds

1. Create a new release branch in the form of `comet-uswds-release-[MAJOR.MINOR.PATCH]`
2. Create a PR into main (should only include package.json and package-lock.json)
3. Once approved, merge the PR into main
4. Navigate to the Releases GitHub page and create a new Draft release
- Set tag and title to the version number
- Click the Generate release notes button (update as needed)
- Click Save draft
5. Publish when ready
6. Verify the Publish Package GitHub Action completes correctly
7. Verify a new release is available in NPM

## Releasing a new version of comet-data-viz, comet-extras, etc

1. Create a new release branch in the form of `comet-data-viz-release-[MAJOR.MINOR.PATCH]`
2. Create a PR into main (should only include package.json and package-lock.json)
3. Once approved, merge the PR into main
4. Open a terminal on your local machine and navigate to the root of the project
5. Run a build for the specific package (example below):

```
npm run build:comet-data-viz
```

6. Publish the new package to NPM (example below):

```
npm run publish:comet-data-viz
```

7. Verify no errors in the terminal
8. Verify a new release is available on NPM
Binary file added images/comet-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"build:comet-data-viz": "cd packages/comet-data-viz && rollup -c",
"build:comet-extras": "cd packages/comet-extras && rollup -c",
"publish:comet-uswds": "cd packages/comet-uswds && npm publish --access public --provenance",
"publish:comet-data-viz": "cd packages/comet-data-viz && npm publish --access public --provenance",
"publish:comet-extras": "cd packages/comet-extras && npm publish --access public --provenance"
"publish:comet-data-viz": "cd packages/comet-data-viz && npm publish --access public",
"publish:comet-extras": "cd packages/comet-extras && npm publish --access public"
},
"devDependencies": {
"@babel/core": "^7.19.3",
Expand Down

0 comments on commit 581e3db

Please sign in to comment.