Skip to content

Commit edce589

Browse files
committed
Create new pipeline with a job to publish only on master
1 parent faebaa9 commit edce589

3 files changed

Lines changed: 54 additions & 47 deletions

File tree

.github/workflows/Build.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/Tests.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/pipeline.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Install Node
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '14.x'
20+
- name: Clean install npm dependencies
21+
run: npm ci
22+
- name: Check project can build successfully
23+
run: npm run build
24+
- name: Check git is still clean after building
25+
run: npm run has-no-changes
26+
- name: Check project linting
27+
run: npm run lint:check
28+
29+
tests:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: cypress-io/github-action@v2
34+
with:
35+
browser: chrome
36+
headless: true
37+
spec: "cypress/integration/*"
38+
39+
publish:
40+
needs: [build, tests]
41+
if: github.ref == 'refs/heads/master'
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Install Node
46+
uses: actions/setup-node@v2
47+
with:
48+
node-version: '14.x'
49+
- name: Clean install npm dependencies
50+
run: npm ci
51+
- name: JS-DevTools/npm-publish@v1
52+
with:
53+
token: ${{ secrets.NPM_TOKEN }}
54+
check-version: true

0 commit comments

Comments
 (0)