Files
cocos4/.github/workflows/check_version.yml
T
fish9167 2fc33010be add githup action (#8892)
ADD GitHub Action:check version files
2021-06-29 11:25:51 +08:00

40 lines
977 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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}