forked from axel-op/googlejavaformat-action
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 702 Bytes
/
compile.yml
File metadata and controls
31 lines (29 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Compile and push dist file
on:
push:
branches: [master]
jobs:
compile-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Compile with ncc
run: |
npm install
npx ncc build index.js -o dist
- name: Push
env:
DIR: dist
run: |
if git diff --exit-code $DIR
then
exit 0
fi
git config user.name github-actions
git config user.email github-actions@github.com
git add $DIR/*
git commit -m "Update dist/index.js"
git push