v1.8.0 #14
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 main | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Disable Windows Defender | |
run: | | |
Set-MpPreference -DisableRealtimeMonitoring $true | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
choco install zip | |
- name: Build Windows Executable | |
run: | | |
pip install pyinstaller | |
pip uninstall pathlib | |
pyinstaller -F -w main.py | |
zip -r output.zip dist | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.event.pull_request.title }} | |
release_name: 瀚万客服小程序 ${{ github.event.pull_request.title }} | |
body: ${{ github.event.pull_request.body }} | |
draft: false | |
prerelease: false | |
- name: Upload Windows Executable and init_conf | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: | | |
${{ github.workspace }}\dist\main.exe | |
asset_name: | | |
main.exe | |
asset_content_type: | | |
application/octet-stream |