docs: update readme #26
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 Executable | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- "v*" | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Executable | |
run: | | |
pyinstaller --clean --onefile --noconsole --icon assets/Graphicloads-Colorful-Long-Shadow-Cloud.ico ` | |
--add-data "assets;assets" ` | |
-n hitsz-connect-verge main.py | |
- name: Archive Executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hitsz-connect-verge | |
path: dist/hitsz-connect-verge.exe | |
release: | |
permissions: write-all | |
needs: build | |
if: startsWith(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: hitsz-connect-verge | |
path: hitsz-connect-verge | |
- name: Publish Release | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "hitsz-connect-verge/*" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ github.ref_name }} |