Skip to content

优化

优化 #28

Workflow file for this run

name: Build Windows Executable
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*'
jobs:
build:
name: Build exe with PyInstaller
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
name: Checkout code
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11' # Use the version of Python you need
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller # Add other dependencies if needed
pip install -r requirements.txt
- name: Build Executable
run: |
echo ${{ github.sha }} > Release.txt
pyinstaller main.spec
mv dist baijing_autohelper
7z a -t7z -r "baijing_autohelper.7z" "baijing_autohelper"
- 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-win
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./baijing_autohelper.7z
asset_name: baijing_autohelper.7z
asset_content_type: application/zip