Skip to content

Commit

Permalink
chore: prepare CI
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1992 committed Sep 8, 2023
1 parent 0a5d7c5 commit ab919d7
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# GitHub Actions docs
# https://help.github.com/en/articles/about-github-actions
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: CI

on: [push]

jobs:
build:
# Machine environment:
# https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts
# We specify the Node.js version manually below, and use versioned Chrome from Puppeteer.
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.10.0
uses: actions/setup-node@v3
with:
node-version: 18.10.0
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --no-progress
- name: Format check
run: yarn prettier:check
- name: Build Lib
run: yarn lib:build:prod
- name: Copy built README & LICENCE into dist
run: cp README.md LICENSE dist/ngx-grpc-interceptor
- name: Release
if: contains('refs/heads/master', github.ref)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2019 CloudNC Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"prettier": "prettier",
"prettier:base": "yarn run prettier \"**/*.{js,json,scss,md,ts,html,component.html}\"",
"prettier:write": "yarn run prettier:base --write",
"prettier:check": "yarn run prettier:base --list-different"
"prettier:check": "yarn run prettier:base --list-different",
"lib:build:prod": "yarn run ng build --project ngx-grpc-interceptor --configuration production",
"lib:build:watch": "yarn run lib:build:prod --watch",
"lib:test:watch": "yarn run ng test --project ngx-grpc-interceptor"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit ab919d7

Please sign in to comment.