feat: 新增负载均衡策略组 #25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/build.yml | |
| name: build_script_and_check_format | |
| on: | |
| push: | |
| branches: ['main'] | |
| paths: | |
| - 'src/**' | |
| - 'Script/*' | |
| - 'build.js' | |
| - '.prettierrc*' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout code | |
| uses: actions/checkout@v6 | |
| - name: setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - name: install prettier | |
| run: npm install -g prettier | |
| - name: format files | |
| run: | | |
| prettier src/**/*.js Script/*.js build.js --write | |
| - name: run build script | |
| run: node build.js | |
| - name: commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git diff --cached --quiet || ( | |
| git commit -m "build: 更新脚本" | |
| git push | |
| ) |