-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.18 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
name: build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: install dependencies
run: pnpm install
- name: build
run: pnpm build:tsp
- name: setup git-url
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
- name: commit
env:
GIT_AUTHOR_NAME: actions-user
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: actions-user
GIT_COMMITTER_EMAIL: [email protected]
run: |
git add ./dist
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "update openapi"
git push origin main
fi
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true