Skip to content

Commit 6dbf6ed

Browse files
committed
Revert "Do not publish to npm"
This reverts commit 80ea707.
1 parent 3950889 commit 6dbf6ed

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

Diff for: .github/workflows/publish.yml

+9
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ jobs:
4343
prerelease: ${{ contains(github.ref_name, '-') }}
4444
files: '*.tgz'
4545
body_path: ${{ github.workspace }}/${{ steps.changelog.outputs.outfile }}
46+
npm:
47+
name: npm
48+
uses: ./.github/workflows/_publish.yml
49+
needs: build
50+
with:
51+
artifact_name: ${{ needs.build.outputs.artifact_name }}
52+
registry_host: https://registry.npmjs.org
53+
secrets:
54+
registry_token: ${{ secrets.NPM_TOKEN }}
4655
github:
4756
name: GitHub Packages
4857
uses: ./.github/workflows/_publish.yml

Diff for: README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# TypeScript Module Package Skeleton
22

3+
[![npm](https://img.shields.io/npm/v/@seamapi/makenew-tsmodule.svg)](https://www.npmjs.com/package/@seamapi/makenew-tsmodule)
34
[![GitHub Actions](https://github.com/seamapi/makenew-tsmodule/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/makenew-tsmodule/actions/workflows/check.yml)
45

56
Package skeleton for a TypeScript module.
@@ -14,7 +15,7 @@ Bootstrap a new TypeScript module in five minutes or less.
1415
- Native [ECMAScript module] compatible with [Node.js].
1516
- Package management with [npm].
1617
- Use private packages from [GitHub Packages].
17-
- Publish as a package to [GitHub Packages].
18+
- Publish as a package to [GitHub Packages] and [npm].
1819
- Examples with configurable options and arguments powered by [yargs] with [landlubber].
1920
- Linting with the [JavaScript Standard Style] using [ESLint].
2021
- [Prettier] code.
@@ -27,6 +28,7 @@ Bootstrap a new TypeScript module in five minutes or less.
2728
- Start coding instantly with [GitHub Codespaces].
2829
- Get PR reviews directly from [code owners].
2930
- Automatically close [stale] Issues and Pull Requests.
31+
- Badges from [Shields.io].
3032

3133
[AVA]: https://github.com/avajs/ava
3234
[code owners]: https://github.blog/2017-07-06-introducing-code-owners/
@@ -42,6 +44,7 @@ Bootstrap a new TypeScript module in five minutes or less.
4244
[Node.js]: https://nodejs.org/
4345
[Prettier]: https://prettier.io/
4446
[semantic-release]: https://semantic-release.gitbook.io/
47+
[Shields.io]: https://shields.io/
4548
[stale]: https://github.com/marketplace/stale
4649
[TypeScript]: https://www.typescriptlang.org/
4750
[c8]: https://github.com/bcoe/c8
@@ -102,14 +105,7 @@ $ git merge makenew/main
102105

103106
## Installation
104107

105-
Add this as a dependency to your project using [npm]
106-
by adding the line below to your project's `.npmrc`,
107-
108-
```
109-
@seamapi:registry=https://npm.pkg.github.com
110-
```
111-
112-
and installing the package with
108+
Add this as a dependency to your project using [npm] with
113109

114110
```
115111
$ npm install @seamapi/makenew-tsmodule
@@ -209,6 +205,7 @@ _GitHub Actions should already be configured: this section is for reference only
209205

210206
The following repository secrets must be set on [GitHub Actions]:
211207

208+
- `NPM_TOKEN`: npm token for installing and publishing packages.
212209
- `GH_TOKEN`: A personal access token for the bot user with
213210
`packages:write` and `contents:write` permission.
214211
- `GIT_USER_NAME`: The GitHub bot user's real name.

Diff for: makenew.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ makenew () {
5555
read -p '> Short package description (Foos and bars.): ' mk_description
5656
read -p '> GitHub repository name (my-repo): ' mk_repo
5757

58-
sed_delete README.md '9,101d'
59-
sed_insert README.md '9i' 'TODO'
58+
sed_delete README.md '10,104d'
59+
sed_insert README.md '10i' 'TODO'
6060

6161
find_replace "s/^ \"version\": \".*\"/ \"version\": \"0.0.0\"/g"
6262
find_replace "s/TypeScript Module Package Skeleton/${mk_title}/g"

0 commit comments

Comments
 (0)