forked from OrRosenblatt/validate-json-action
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.24 KB
/
build.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
on:
push:
branches:
- master
name: Compile Action
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Compile
run: |
npm run build
npm run pack
- name: Generate token
uses: tibdex/github-app-token@v1
id: generate-token
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_PRIVATE_KEY }}
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: Compile Action
author_name: scratchaddons-bot[bot]
author_email: 73682299+scratchaddons-bot[bot]@users.noreply.github.com
add: dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}