Skip to content

Commit

Permalink
CI update
Browse files Browse the repository at this point in the history
  • Loading branch information
hasnainroopawalla committed Aug 12, 2023
1 parent a121281 commit 76984c6
Show file tree
Hide file tree
Showing 10 changed files with 400 additions and 176 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches:
- master

permissions:
contents: write

jobs:
build-test-bump-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Run tests
run: npm test
- name: Automated version bump
uses: "phips28/gh-action-bump-version@master"
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
with:
major-wording: "major,Major"
minor-wording: "minor,Minor"
patch-wording: "patch,bug,Patch,Bug"
commit-message: "CI: bump version to {{version}}"
11 changes: 7 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull Request Build
name: Pull Request
on:
pull_request:
branches: [master]
Expand All @@ -13,6 +13,9 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm test
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Run tests
run: npm test
20 changes: 11 additions & 9 deletions .github/workflows/deploy.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Deploy
name: Release
on:
push:
branches:
- master
release:
types: [published]

jobs:
build-test-deploy:
build-test-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -14,10 +13,13 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm test
- name: Deploy
- name: Install dependencies
run: npm install
- name: Build package
run: npm run build
- name: Run tests
run: npm test
- name: Trigger deploy
uses: crazy-max/ghaction-github-pages@v3
with:
target_branch: release
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
.DS_Store
.DS_Store
build/
153 changes: 0 additions & 153 deletions build/bundle.js

This file was deleted.

Loading

0 comments on commit 76984c6

Please sign in to comment.