Skip to content

Commit 1eb646d

Browse files
committed
Add ci and publish GitHub Actions
1 parent a6f3344 commit 1eb646d

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# https://docs.github.com/actions/reference/workflow-syntax-for-github-actions
2+
3+
name: CI
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2
13+
- run: npm ci
14+
- run: npm run lint

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://docs.github.com/actions/reference/workflow-syntax-for-github-actions
2+
3+
name: Publish
4+
5+
on:
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
publish-to-npm:
11+
if: github.repository_owner == 'simonbrunel'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
registry-url: https://registry.npmjs.org/
19+
- run: npm ci
20+
- run: npm publish
21+
env:
22+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
"version": "0.1.0",
55
"license": "MIT",
66
"main": "index.js",
7+
"files": [
8+
"components/",
9+
"global-components/",
10+
"styles/",
11+
"enhanceApp.js",
12+
"index.js"
13+
],
714
"scripts": {
815
"lint": "eslint . --ext .js,.vue"
916
},

0 commit comments

Comments
 (0)