Skip to content

Commit fba52a8

Browse files
committed
Add Feature Branch Build
1 parent 82ced3c commit fba52a8

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/scripts/verify-build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
# Check if build output at dist is uptodate or not
4+
5+
# Check files updated in working dir
6+
git status dist -s
7+
8+
# Raise error if more than 1 files changed in working dir
9+
if [[ ! -z $(git status dist -s) ]]; then
10+
echo "Build at dist is outdated. Update build, push and try again."
11+
exit 1
12+
fi
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Branch
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
name: Build
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Setup node
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 12
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build package
25+
run: npm run build
26+
27+
- name: Verify build
28+
run: .github/scripts/verify-build.sh

0 commit comments

Comments
 (0)