Skip to content

Commit db8b8b5

Browse files
committed
👷 feat: add publish workflow
1 parent 1c63f90 commit db8b8b5

File tree

4 files changed

+37
-11
lines changed

4 files changed

+37
-11
lines changed

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Publish Package to NPM'
2+
3+
on: push
4+
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: checkout
10+
uses: actions/checkout@v2
11+
- name: node
12+
uses: actions/setup-node@v2
13+
with:
14+
node-version: 20
15+
registry-url: https://registry.npmjs.org
16+
- name: publish
17+
run: npm publish --access public
18+
env:
19+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
/dist
2-
/node_modules
2+
node_modules/
3+
jspm_packages/
4+
5+
web_modules/
6+
7+
*.tsbuildinfo\

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
2-
"name": "run-script",
2+
"name": "@gabsf-dev/run-script",
33
"version": "0.0.1",
44
"description": "The effortlessly way to run your package.json scripts",
5-
"main": "index.js",
5+
"main": "./dist/index.js",
6+
"bin": {
7+
"run-script": "./dist/index.js"
8+
},
69
"scripts": {
7-
"dev": "npx tsc && node ./dist/index.js",
8-
"run-script": "node ./dist/index.js",
910
"build": "npx tsc",
1011
"test": "echo \"Error: no test specified\" && exit 1"
1112
},
1213
"keywords": [
14+
"run-script",
1315
"run",
1416
"script",
1517
"package.json"
1618
],
17-
"author": "gabrielfdev",
18-
"license": "ISC",
19+
"author": "gabrielf.dev",
20+
"license": "MIT",
1921
"type": "commonjs",
20-
"repository": {
21-
"url": "https://github.com/gabsf-dev/run-script"
22-
},
22+
"repository": "https://github.com/gabsf-dev/run-script",
2323
"homepage": "https://github.com/gabsf-dev/run-script/blob/main/README.md",
2424
"dependencies": {
2525
"@types/figlet": "^1.7.0",
@@ -32,4 +32,4 @@
3232
"@types/node": "^22.13.10",
3333
"typescript": "^5.8.2"
3434
}
35-
}
35+
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#! /usr/bin/env node
2+
13
import { Command } from 'commander';
24
import figlet from 'figlet';
35

0 commit comments

Comments
 (0)