增加两处掉线重连判断 #10
Workflow file for this run
This file contains 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: Build and Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install pipreqs | |
pipreqs src --encoding=utf8 --savepath src/requirementstemp.txt | |
pip install -r src/requirements.txt | |
pip install -r src/requirementstemp.txt | |
- name: Build executable | |
run: | | |
python build.py | |
- name: Move executable to root | |
run: | | |
move dist\ZZZ_Copilot.exe . | |
- name: Get current commit ID | |
run: | | |
echo $env:GITHUB_SHA > version | |
shell: pwsh | |
- name: Create zip file | |
run: | | |
powershell Compress-Archive -Path ZZZ_Copilot.exe, assets, version -DestinationPath ZZZ_Copilot.zip | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./ZZZ_Copilot.zip | |
asset_name: ZZZ_Copilot.zip | |
asset_content_type: application/zip |