-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Harjot Singh <harjot@harkul.com>
- Loading branch information
1 parent
6302051
commit e4d3bd5
Showing
6 changed files
with
180 additions
and
65 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Runs CI tasks on pull requests and pushes | ||
|
||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
push: | ||
branches-ignore: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Run linter | ||
run: npm run lint | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Run Tests | ||
run: npm run test | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Continuous Deployment | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-publish: | ||
name: Build and Publish to NPM | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12.x | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Build module | ||
run: npm run build | ||
|
||
- name: Release module on NPM | ||
run: | | ||
# Configure git | ||
git config --global push.default current | ||
git config --global user.email "team@shabados.com" | ||
git config --global user.name "ShabadOS Bot" | ||
# Run Release script | ||
chmod +x release.sh | ||
echo "Releasing on Github" | ||
npm run release | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters