Skip to content

Commit 6786bec

Browse files
authored
Merge pull request #135 from jackdomleo7/publish_in_pipeline
2 parents 343574b + b2ed54a commit 6786bec

5 files changed

Lines changed: 81 additions & 74 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

package-lock.json

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "checka11y.css",
66
"style": "checka11y.css",
77
"scripts": {
8-
"prepublishOnly": "git-branch-is master && is-git-status-clean && npm run test",
8+
"prepublishOnly": "git-branch-is master && is-git-status-clean",
99
"build": "npm run lint:fix && npm run build:errors-and-warnings && npm run build:errors-only && npm run build:warnings-only",
1010
"build:errors-and-warnings": "sass --no-source-map src/checka11y.scss ./checka11y.css --style=compressed && sass --no-source-map ./checka11y.css ./checka11y.css --style=expanded && npx postcss checka11y.css --use autoprefixer --replace --no-map",
1111
"build:errors-only": "sass --no-source-map src/errors/checka11y-errors.scss ./checka11y-errors.css --style=compressed && sass --no-source-map ./checka11y-errors.css ./checka11y-errors.css --style=expanded && npx postcss checka11y-errors.css --use autoprefixer --replace --no-map",
@@ -71,7 +71,7 @@
7171
"is-git-status-clean": "^1.0.0",
7272
"postcss": "^8.3.9",
7373
"postcss-cli": "^9.0.1",
74-
"sass": "^1.42.1",
74+
"sass": "^1.43.2",
7575
"stylelint": "^13.13.1",
7676
"stylelint-scss": "^3.21.0"
7777
},

0 commit comments

Comments
 (0)