Skip to content

Commit 5bafe36

Browse files
committed
Use github package registry
1 parent 1a90905 commit 5bafe36

File tree

4 files changed

+47
-3
lines changed

4 files changed

+47
-3
lines changed

.github/workflows/cd.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish to GPR
2+
on:
3+
release:
4+
types: ["created"]
5+
jobs:
6+
build:
7+
runs-on: "ubuntu-latest"
8+
timeout-minutes: 10
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
node-version: [13.x]
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- name: Install Dependencies
20+
run: yarn install
21+
- name: Build
22+
run: yarn run build
23+
publish-gpr:
24+
runs-on: "ubuntu-latest"
25+
needs: ["build"]
26+
steps:
27+
- uses: actions/checkout@v1
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
registry-url: https://npm.pkg.github.com
33+
scope: "@kipr"
34+
- name: Publish to GPR
35+
run: yarn publish
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.git
3+
.gitignore

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@kipr:registry=https://npm.pkg.github.com

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@
66
"author": "KISS Institute for Practical Robotics",
77
"license": "GPLv3",
88
"private": false,
9+
"publishConfig": {
10+
"registry": "https://npm.pkg.github.com"
11+
},
912
"scripts": {
10-
"build": "tsc",
11-
"install": "yarn run build"
13+
"build": "tsc"
1214
},
13-
"peerDependencies": {
15+
"devDependencies": {
1416
"typescript": "^4.8.4"
1517
}
1618
}

0 commit comments

Comments
 (0)