-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 884 Bytes
/
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
name: Build package
on:
push:
branches: [ main ]
paths-ignore:
- '*.md' # ignore changes to readmes
- '*.js' # ignore js files
pull_request:
branches: [ main ]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun i
- name: Build package
run: bun run build
- name: Commit JS files
run: |
set +e
git add dist/
git config user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
git commit -m "build: build package"
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY"