Files
cocos4/.github/workflows/interface-check.yml
T
PP 08400c884c add ${{ secrets.LABEl_TOKEN }} for interface check (#9698)
* Revert "Test permission issue on CI (#9697)"

This reverts commit 3965ccd35e.

* add ${{ secrets.LABEl_TOKEN }} for interface check

* test

* test

* test

* test

* test
2021-11-22 18:05:48 +08:00

48 lines
1.3 KiB
YAML

name: interface check
#on: push
on: [pull_request]
jobs:
Check_pull_request_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: npm install
run: |
npm install --ignore-scripts
- name: build HEAD declaration
run: |
npm run build-declaration
cp ./bin/.declarations/cc.d.ts ./bin/cc_head.d.ts
- name: git checkout to base branch
run: |
base_branch=`echo ${{ github.base_ref }} | awk -F'/' '{print $NF}'`
git fetch origin ${base_branch}
git checkout remotes/origin/${base_branch}
- name: build base declaration
run: |
npm run build-declaration
- uses: LouisBrunner/diff-action@v0.1.2
with:
old: ./bin/.declarations/cc.d.ts
new: ./bin/cc_head.d.ts
mode: addition
tolerance: worse
output: ./interface-diff.txt
- name: optimize interface check report
run: |
cat ./interface-diff.txt
node ./.github/workflows/interface-check-report.js
- uses: marocchino/sticky-pull-request-comment@v2
with:
path: ./interface-diff.txt
GITHUB_TOKEN: ${{ secrets.LABEl_TOKEN }}