Skip to content

Commit 589a144

Browse files
authored
Create npm.yml
1 parent cac0b01 commit 589a144

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/npm.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on: push
2+
name: Build and Publish
3+
jobs:
4+
all:
5+
name: Build and Publish
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: Shell Linter
10+
uses: azohra/shell-linter@v0.3.0
11+
- name: Docker Lint
12+
uses: luke142367/Docker-Lint-Action@v1.0.0
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
TARGET: Dockerfile
16+
- name: Build Docker
17+
run: docker build -t test .
18+
- name: Cache node_modules
19+
id: cache-modules
20+
uses: actions/cache@v1
21+
with:
22+
path: node_modules
23+
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}
24+
- name: Build
25+
if: steps.cache-modules.outputs.cache-hit != 'true'
26+
run: npm install
27+
- name: Test
28+
run: npm test
29+
- name: Publish
30+
if: github.ref == 'refs/heads/master'
31+
uses: mikeal/merge-release@master
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 commit comments

Comments
 (0)