Skip to content

Commit

Permalink
Move package to npmjs.org registry
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgelling committed Jan 6, 2024
1 parent 1b06b9b commit 447d893
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@ on:
jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: write
packages: write
id-token: write

steps:
- uses: actions/checkout@v4
- run: git config user.name release-bot
- run: git config user.email [email protected]

# Setup .npmrc file to publish to GitHub Packages
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
scope: '@danielgelling'
registry-url: 'https://registry.npmjs.org/'

- run: npm ci

- run: |
Expand All @@ -30,6 +30,6 @@ jobs:
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm publish
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<p>
<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>
<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>
<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>
<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>
<a href="https://www.npmjs.com/package/p1-monitor"><img alt="Downloads" src="https://img.shields.io/npm/dt/p1-monitor" /></a>
<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>
<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>
</p>

# About
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "@danielgelling/p1-monitor",
"name": "p1-monitor",
"version": "1.0.0",
"description": "Module to monitor a Smart Meter using its P1 port",
"author": "Daniel Gelling <[email protected]>",
"license": "MIT",
"main": "lib/index.js",
"scripts": {
"build": "tsc",
Expand All @@ -10,10 +12,8 @@
},
"repository": {
"type": "git",
"url": "github.com/danielgelling/p1-monitor"
"url": "https://github.com/danielgelling/p1-monitor"
},
"author": "Daniel Gelling <[email protected]>",
"license": "MIT",
"dependencies": {
"luxon": "^3.4.4",
"node": "^20.10.0",
Expand Down

0 comments on commit 447d893

Please sign in to comment.