-
Notifications
You must be signed in to change notification settings - Fork 2k
40 lines (34 loc) · 1.02 KB
/
pull_request.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
name: PullRequest
on: pull_request
jobs:
ci:
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
diff-npm-package:
name: Diff content of NPM package
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Deepen cloned repo
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: 'git fetch --depth=1 origin $BASE_SHA:refs/tags/BASE'
- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version-file: '.node-version'
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Generate report
run: 'node resources/diff-npm-package.js BASE HEAD'
- name: Upload generated report
uses: actions/upload-artifact@v4
with:
name: npm-dist-diff.html
path: ./npm-dist-diff.html
if-no-files-found: ignore