-
Notifications
You must be signed in to change notification settings - Fork 81
45 lines (35 loc) · 1015 Bytes
/
Copy pathbuild-release.yml
File metadata and controls
45 lines (35 loc) · 1015 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
41
42
43
44
45
on:
push:
branches:
- master
name: build-release
permissions:
contents: write
jobs:
build:
name: build-release
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "24.x"
- run: sudo npm i -g @vercel/ncc
- run: npm install
- name: Compile files
run: |
ncc build -C -m src/entrypoint.ts
- 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"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master