Skip to content

Commit

Permalink
Merge pull request #1 from FranzDiebold/chore/improve-ci-cd
Browse files Browse the repository at this point in the history
Chore/improve CI/CD
  • Loading branch information
FranzDiebold authored Jun 22, 2020
2 parents b836190 + a3b6949 commit f410792
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Test, Lint, Build and Deploy
name: Test, lint, build and deploy

on:
push:
branches:
- master
release:
types:
- published

jobs:
lib:
runs-on: ubuntu-18.04
lib_test_and_lint:
name: Test and lint library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -19,23 +21,41 @@ jobs:
- run: make install
- run: make test-lib-ci
- run: make lint-lib

lib_publish:
name: Publish library
needs: lib_test_and_lint
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: make install
- run: make publish-lib
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

demo:
runs-on: ubuntu-18.04
name: Build, test, lint and deploy demo application
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: make install
- run: make build-lib
- run: make test-demo-ci
- run: make lint-demo
- run: make deploy-demo
if: github.ref == 'refs/heads/master'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ng-google-sheets-db - Angular Google Sheets DB

[![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)
[![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)
[![demo: app](https://img.shields.io/badge/demo-app-2ca467.svg)](https://franzdiebold.github.io/ng-google-sheets-db-library/)
[![demo: StackBlitz](https://img.shields.io/badge/demo-StackBlitz-1389fd.svg)](https://stackblitz.com/edit/ng-google-sheets-db-demo)
[![Angular: v9](https://img.shields.io/badge/Angular-v9-DD0031.svg)](./projects/ng-google-sheets-db/package.json)
Expand Down
2 changes: 1 addition & 1 deletion projects/ng-google-sheets-db/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ng-google-sheets-db - Angular Google Sheets DB

[![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)
[![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)
[![demo: app](https://img.shields.io/badge/demo-app-2ca467.svg)](https://franzdiebold.github.io/ng-google-sheets-db-library/)
[![demo: StackBlitz](https://img.shields.io/badge/demo-StackBlitz-1389fd.svg)](https://stackblitz.com/edit/ng-google-sheets-db-demo)
[![Angular: v9](https://img.shields.io/badge/Angular-v9-DD0031.svg)](./projects/ng-google-sheets-db/package.json)
Expand Down

0 comments on commit f410792

Please sign in to comment.