Skip to content

Commit c8fd78b

Browse files
committed
Publish library via GitHub CI
Make npm package publicly available Remove CI trigger on main push, rely on releases Version bumb to 1.0.1
1 parent 4720bcd commit c8fd78b

2 files changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/basics.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Publish Basics
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-publish:
9+
runs-on: ubuntu-latest
10+
env:
11+
workdir: basics
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v1
15+
with:
16+
node-version: '14.x'
17+
registry-url: 'https://npm.pkg.github.com'
18+
- run: npm install
19+
working-directory: ${{ env.workdir }}
20+
- run: npm run lint
21+
working-directory: ${{ env.workdir }}
22+
- run: npm run build
23+
working-directory: ${{ env.workdir }}
24+
- run: npm publish --access public
25+
working-directory: ${{ env.workdir }}
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

basics/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "node-dry-basics",
3-
"version": "1.0.0",
2+
"name": "@jvalue/node-dry-basics",
3+
"version": "1.0.1",
44
"description": "Reusable libraries for our node projects (NOT containing any dependencies)",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -22,6 +22,9 @@
2222
"eslint-plugin-standard": "^4.0.1",
2323
"typescript": "^4.0.5"
2424
},
25+
"publishConfig": {
26+
"registry":"https://npm.pkg.github.com"
27+
},
2528
"repository": {
2629
"type": "git",
2730
"url": "git+https://github.com/jvalue/node-dry.git"

0 commit comments

Comments
 (0)