@nikil.srinivasan/sample-npm-package 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,30 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - name: Checkout
18
+ uses: actions/checkout@v4
19
+
20
+ - name: Setup Node
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: 20
24
+ registry-url: https://registry.npmjs.org
25
+
26
+ - name: Install dependencies
27
+ run: npm ci || npm install
28
+
29
+ - name: Publish package
30
+ run: npm publish --access public
package/index.js ADDED
@@ -0,0 +1,3 @@
1
+ export function greet(name) {
2
+ return `Hello ${name}`;
3
+ }
package/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@nikil.srinivasan/sample-npm-package",
3
+ "version": "1.0.0",
4
+ "description": "Sample npm package",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "license": "MIT"
8
+ }