mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
2fc33010be
ADD GitHub Action:check version files
40 lines
977 B
YAML
40 lines
977 B
YAML
name: check version
|
||
|
||
#on: push
|
||
on: [create, pull_request]
|
||
|
||
jobs:
|
||
Check_pull_request_version:
|
||
runs-on: ubuntu-latest
|
||
if: github.event_name == 'pull_request'
|
||
steps:
|
||
- uses: actions/checkout@v2
|
||
|
||
- name: npm install
|
||
run: |
|
||
node -v
|
||
npm install || exit 0
|
||
|
||
- name: check version
|
||
run: |
|
||
branch=`echo ${{ github.base_ref }} | awk -F'/' '{print $NF}'`
|
||
echo "Branch: ${branch}"
|
||
npm run varify-engine-version -- ${branch}
|
||
|
||
Check_create_version:
|
||
runs-on: ubuntu-latest
|
||
if: github.event_name == 'create'
|
||
steps:
|
||
- uses: actions/checkout@v2
|
||
|
||
- name: npm install
|
||
run: |
|
||
node -v
|
||
npm install || exit 0
|
||
- name: check version
|
||
run: |
|
||
branch=`echo ${{ github.ref }} | awk -F'/' '{print $NF}'`
|
||
echo "Branch: ${branch}"
|
||
npm run varify-engine-version -- ${branch}
|
||
|