-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (39 loc) · 1.01 KB
/
Copy pathbuild.yml
File metadata and controls
49 lines (39 loc) · 1.01 KB
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
49
name: Build
on:
push:
paths-ignore:
- dist
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: lts/*
- name: Get short SHA
id: short_github_sha
run: |
id=$(echo ${{ github.sha }} | cut -c 1-7)
echo "id=$id" >> $GITHUB_OUTPUT
- name: Installing dependencies
run: yarn
- name: Testing
run: npm run test
- name: Building
run: npm run package
- name: Git config
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Git commit
id: commit
continue-on-error: true
run: |
git add dist
git commit -m "build ${{ steps.short_github_sha.outputs.id }}"
- name: Push
if: steps.commit.outcome != 'failure'
run: git push