Skip to content

Commit 447d893

Browse files
committed
Move package to npmjs.org registry
1 parent 1b06b9b commit 447d893

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/publish-package.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ on:
55
jobs:
66
publish:
77
runs-on: ubuntu-latest
8+
89
permissions:
910
contents: write
10-
packages: write
11+
id-token: write
12+
1113
steps:
1214
- uses: actions/checkout@v4
1315
- run: git config user.name release-bot
1416
- run: git config user.email [email protected]
1517

16-
# Setup .npmrc file to publish to GitHub Packages
1718
- uses: actions/setup-node@v3
1819
with:
1920
node-version: '20.x'
20-
registry-url: 'https://npm.pkg.github.com'
21-
# Defaults to the user or organization that owns the workflow file
22-
scope: '@danielgelling'
21+
registry-url: 'https://registry.npmjs.org/'
22+
2323
- run: npm ci
2424

2525
- run: |
@@ -30,6 +30,6 @@ jobs:
3030
env:
3131
TAG_NAME: ${{ github.event.release.tag_name }}
3232
33-
- run: npm publish
33+
- run: npm publish --provenance --access public
3434
env:
3535
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<p>
22
<a href="https://github.com/danielgelling/p1-monitor/actions/workflows/test-suite.yaml"><img alt="Test suite" src="https://github.com/danielgelling/p1-monitor/actions/workflows/test-suite.yaml/badge.svg?branch=master" /></a>
3-
<a href="https://github.com/danielgelling/p1-monitor/pkgs/npm/p1-monitor"><img alt="Downloads" src="https://img.shields.io/badge/downloads-69-green" /></a>
4-
<a href="https://github.com/danielgelling/p1-monitor/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-green.svg" /></a>
3+
<a href="https://github.com/danielgelling/p1-monitor/actions/workflows/test-suite.yaml"><img alt="Test suite" src="https://img.shields.io/github/issues-raw/danielgelling/p1-monitor" /></a>
4+
<a href="https://www.npmjs.com/package/p1-monitor"><img alt="Downloads" src="https://img.shields.io/npm/dt/p1-monitor" /></a>
5+
<a href="https://www.npmjs.com/package/p1-monitor/v/latest?activeTab=versions"><img alt="Latest version" src="https://img.shields.io/npm/v/p1-monitor" /></a>
6+
<a href="https://github.com/danielgelling/p1-monitor/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/npm/l/p1-monitor" /></a>
57
</p>
68

79
# About

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
2-
"name": "@danielgelling/p1-monitor",
2+
"name": "p1-monitor",
33
"version": "1.0.0",
44
"description": "Module to monitor a Smart Meter using its P1 port",
5+
"author": "Daniel Gelling <[email protected]>",
6+
"license": "MIT",
57
"main": "lib/index.js",
68
"scripts": {
79
"build": "tsc",
@@ -10,10 +12,8 @@
1012
},
1113
"repository": {
1214
"type": "git",
13-
"url": "github.com/danielgelling/p1-monitor"
15+
"url": "https://github.com/danielgelling/p1-monitor"
1416
},
15-
"author": "Daniel Gelling <[email protected]>",
16-
"license": "MIT",
1717
"dependencies": {
1818
"luxon": "^3.4.4",
1919
"node": "^20.10.0",

0 commit comments

Comments
 (0)