Skip to content

Commit 71d1c90

Browse files
authored
Merge pull request #20 from chkfung/ncc-automate
Ncc automate
2 parents 5bb7426 + d80575a commit 71d1c90

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/automate_ncc.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Build with ncc
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Install dependencies
16+
run: npm ci
17+
18+
- name: Build with ncc
19+
run: npx @vercel/ncc build index.js -o dist
20+
21+
- name: Commit and push if changed
22+
run: |
23+
git config --global user.email "actions@github.com"
24+
git config --global user.name "GitHub Action"
25+
git add dist/index.js
26+
git diff --quiet && git diff --staged --quiet || git commit -m "Automated build"
27+
git push

0 commit comments

Comments
 (0)