-
Notifications
You must be signed in to change notification settings - Fork 7
40 lines (33 loc) · 878 Bytes
/
build.yml
File metadata and controls
40 lines (33 loc) · 878 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
32
33
34
35
36
37
38
39
40
on:
push:
branches:
- main
name: build pipeline
permissions:
contents: write
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install dependencies
run: |
npm i -g @vercel/ncc
npm install
- name: Compile files
run: |
npm run build
- name: Commit files
continue-on-error: true # commit will fail if the code wasn't changed. Prevent the build to fail in this case.
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add dist/index.js -f
git commit -m "Add changes"
git push