Skip to content

Commit 1f612c0

Browse files
authored
Merge pull request #2 from lightninglabs/github-workflows
Add GitHub workflows: build, lint, prettier, npm publish
2 parents a474f1f + 0ef9a79 commit 1f612c0

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Build
2+
on: [push]
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run build

.github/workflows/lint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
on: [push]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run lint

.github/workflows/npm.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Package to npmjs
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
# Setup .npmrc file to publish to npm
11+
- uses: actions/setup-node@v3
12+
with:
13+
node-version: '16.x'
14+
registry-url: 'https://registry.npmjs.org'
15+
- run: npm ci
16+
- run: npm publish --access public
17+
env:
18+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/prettier.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Prettier
2+
on: [push]
3+
jobs:
4+
prettier:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- name: Use Node.js
9+
uses: actions/setup-node@v3
10+
with:
11+
node-version: '12.x'
12+
- run: npm ci
13+
- run: npm run prettier

0 commit comments

Comments
 (0)