Skip to content

Commit f410792

Browse files
authored
Merge pull request #1 from FranzDiebold/chore/improve-ci-cd
Chore/improve CI/CD
2 parents b836190 + a3b6949 commit f410792

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
name: Test, Lint, Build and Deploy
1+
name: Test, lint, build and deploy
22

33
on:
44
push:
5-
branches:
6-
- master
5+
release:
6+
types:
7+
- published
78

89
jobs:
9-
lib:
10-
runs-on: ubuntu-18.04
10+
lib_test_and_lint:
11+
name: Test and lint library
12+
runs-on: ubuntu-latest
1113
steps:
1214
- uses: actions/checkout@v2
1315
with:
@@ -19,23 +21,41 @@ jobs:
1921
- run: make install
2022
- run: make test-lib-ci
2123
- run: make lint-lib
24+
25+
lib_publish:
26+
name: Publish library
27+
needs: lib_test_and_lint
28+
if: github.event_name == 'release'
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
with:
33+
persist-credentials: false
34+
- uses: actions/setup-node@v1
35+
with:
36+
node-version: '12.x'
37+
registry-url: 'https://registry.npmjs.org'
38+
- run: make install
2239
- run: make publish-lib
2340
env:
2441
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2542

2643
demo:
27-
runs-on: ubuntu-18.04
44+
name: Build, test, lint and deploy demo application
45+
runs-on: ubuntu-latest
2846
steps:
2947
- uses: actions/checkout@v2
3048
with:
3149
persist-credentials: false
3250
- uses: actions/setup-node@v1
3351
with:
3452
node-version: '12.x'
53+
registry-url: 'https://registry.npmjs.org'
3554
- run: make install
3655
- run: make build-lib
3756
- run: make test-demo-ci
3857
- run: make lint-demo
3958
- run: make deploy-demo
59+
if: github.ref == 'refs/heads/master'
4060
env:
4161
GH_TOKEN: ${{ secrets.GH_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ng-google-sheets-db - Angular Google Sheets DB
22

3-
[![Test, Lint, Build and Deploy](https://github.com/FranzDiebold/ng-google-sheets-db-library/workflows/Test,%20Lint,%20Build%20and%20Deploy/badge.svg)](https://github.com/FranzDiebold/ng-google-sheets-db-library/actions)
3+
[![Test, lint, build and deploy](https://github.com/FranzDiebold/ng-google-sheets-db-library/workflows/Test,%20lint,%20build%20and%20deploy/badge.svg)](https://github.com/FranzDiebold/ng-google-sheets-db-library/actions)
44
[![demo: app](https://img.shields.io/badge/demo-app-2ca467.svg)](https://franzdiebold.github.io/ng-google-sheets-db-library/)
55
[![demo: StackBlitz](https://img.shields.io/badge/demo-StackBlitz-1389fd.svg)](https://stackblitz.com/edit/ng-google-sheets-db-demo)
66
[![Angular: v9](https://img.shields.io/badge/Angular-v9-DD0031.svg)](./projects/ng-google-sheets-db/package.json)

projects/ng-google-sheets-db/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ng-google-sheets-db - Angular Google Sheets DB
22

3-
[![Test, Lint, Build and Deploy](https://github.com/FranzDiebold/ng-google-sheets-db-library/workflows/Test,%20Lint,%20Build%20and%20Deploy/badge.svg)](https://github.com/FranzDiebold/ng-google-sheets-db-library/actions)
3+
[![Test, lint, build and deploy](https://github.com/FranzDiebold/ng-google-sheets-db-library/workflows/Test,%20lint,%20build%20and%20deploy/badge.svg)](https://github.com/FranzDiebold/ng-google-sheets-db-library/actions)
44
[![demo: app](https://img.shields.io/badge/demo-app-2ca467.svg)](https://franzdiebold.github.io/ng-google-sheets-db-library/)
55
[![demo: StackBlitz](https://img.shields.io/badge/demo-StackBlitz-1389fd.svg)](https://stackblitz.com/edit/ng-google-sheets-db-demo)
66
[![Angular: v9](https://img.shields.io/badge/Angular-v9-DD0031.svg)](./projects/ng-google-sheets-db/package.json)

0 commit comments

Comments
 (0)