generated from MeilCli/action-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (42 loc) · 1.3 KB
/
ci-base-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
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ hashFiles('package.json') }}-
${{ runner.OS }}-build-
- run: npm install
- run: npm run build
- run: npm run codegen
- run: npm run test
- run: npm run lint:report
continue-on-error: true
- uses: MeilCli/common-lint-reporter/utils/export-context@v1
- uses: actions/upload-artifact@v4
with:
name: result
path: |
eslint_report.json
common_lint_context.json
- run: npm run pack
if: github.event_name != 'pull_request'
- name: Create Pull Request
if: github.event_name != 'pull_request'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.MEILCLI_BOT }}
commit-message: 'update actions'
title: 'update actions'
labels: 'Action'
assignees: 'MeilCli'
branch: 'update/action'