You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+20-14
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,32 @@ Boilerplate for a TypeScript npm package
6
6
7
7
## Includes
8
8
9
-
- Jest TypeScript configuration
10
-
- ESLint rules
11
-
-`editorconfig` rules & enforcement
9
+
- TypeScript configuration
10
+
-`ts-jest` setup for automated testing
11
+
- ESLint rules & `editorconfig` for linting
12
+
- Prettier and ESLint for deterministic code formatting
12
13
- CI - build, lint & test
13
-
- CD - distribute to `npm` and `gpr` on version tags
14
-
-Automatically populate GitHub releases
14
+
- CD - automated publishing to both [npm](https://www.npmjs.com/) and the [GitHub Package Registry](https://github.com/features/packages)
15
+
-GitHub Releases generated with automatic changelogs populated via a configurable template
15
16
- Dependabot configuration
16
17
- VSCode settings
17
18
18
-
## Publishing
19
+
## Release / Publish
19
20
20
-
Publishing is handled by a continuous delivery workflow within GitHub Actions. By default, new versions are dual-published to both `npm` and the GitHub Package Registry. Comment one out in the `publish` workflow to only use one. If you would like to publish to `npm`, create a `NPM_TOKEN` repository secret.
21
+
Publishing is handled by a continuous delivery workflow within GitHub Actions. By default, new versions are dual-published to both `npm` and `gpr` (the GitHub Package Registry.) Comment one out in `.github/workflows/publish.yml`to only use one. If you would like to publish to `npm`, create a `NPM_TOKEN` repository secret. Publishing to `gpr` does not require an auth token.
21
22
22
-
To publish a new release to `npm` / `gpr` / both, make sure your git repository is clean, and determine what kind of [semantic versioning](https://semver.org) bump this will require. Updates should fall into one of three categories: `major` (breaking changes) `minor` (new functionality without breaking changes) or `patch` (backwards compatible bug fixes).
23
+
First, determine what kind of [semantic versioning](https://semver.org) bump this release will require. Updates should fall into one of three categories: `major` (new functionality with breaking changes) `minor` (new functionality without breaking changes) or `patch` (backwards compatible bug fixes).
23
24
24
-
After determining the version bump type, run `npm version` followed by the release version number you would like to increment. This will increment `package.json` automatically and add a git tag for the new version. So, for example, to publish a version that adds a new a feature, run `npm version minor`. Finally, run `git push --follow-tags` to push the commit and tag created by the prior command.
25
+
To publish a new release, checkout the make sure your git repository is clean and run one of the following commands:
25
26
26
-
```sh
27
-
npm version patch
28
-
git push --follow-tags
29
-
```
27
+
-`npm run release:major` (new functionality with breaking changes)
28
+
-`npm run release:minor` (new functionality without breaking changes)
29
+
-`npm run release:patch` (backwards compatible bug fixes)
30
30
31
-
This will kick off the `release` workflow in Actions, which created a GitHub release with an automatically generated changelog populated by all PRs and commits in this version. The `publish` workflow is triggered as soon as the `release` workflow completes.
31
+
Running any one of these will:
32
+
33
+
1. Increment the version number in `package.json`
34
+
2. Create a git tag with the new version number
35
+
3. Push these changes to GitHub, which triggers the `release` workflow in GitHub Actions
36
+
4. The `release` workflow then creates a new GitHub release with changelog automatically populated with all PRs and commits since the last version
37
+
5. The `publish` workflow is then triggered when the `release` workflow completes. It compiles the package and pushes it up to `npm` / `gpr`
0 commit comments