fix: 修复了URA剧本无法添加任务的问题 #4
Workflow file for this run
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
| name: Python Build and Release | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - '**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10.9 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10.9" | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: | | |
| pyinstaller --onefile --collect-all paddleocr --collect-all pyclipper --collect-all imghdr --collect-all skimage --collect-all imgaug --collect-all scipy.io --collect-all lmdb --collect-all apted main.py | |
| - name: Prepare artifact | |
| shell: pwsh | |
| run: | | |
| copy ${env:RUNNER_TOOL_CACHE}\python\3.10.9\x64\lib\site-packages\paddle\libs\mklml.dll dist/ | |
| copy config.yaml dist/ | |
| copy -Recurse resource dist/resource | |
| copy -Recurse public dist/public | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: umamusume-auto-trainer | |
| path: dist/ | |
| release: | |
| runs-on: windows-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: umamusume-auto-trainer | |
| - name: Package release assets | |
| shell: pwsh | |
| run: | | |
| $releaseName = "umamusume-auto-trainer-${{ github.ref_name }}-windows-x64" | |
| Compress-Archive -Path * -DestinationPath "${releaseName}.zip" | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: "umamusume-auto-trainer-*-windows-x64.zip" |