Initial commit

This commit is contained in:
Hal 2025-01-06 01:26:03 +08:00 committed by GitHub
commit b1a1a6866d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 495 additions and 0 deletions

60
.github/workflows/build-exe.yml vendored Normal file
View file

@ -0,0 +1,60 @@
name: Build Executable
on:
workflow_run:
workflows: ["Python Package"]
types:
- completed
branches:
- "main"
jobs:
build:
# Only run if the python-publish workflow succeeded
if: ${{ github.event.workflow_run.conclusion == 'success' }}
strategy:
fail-fast: false
matrix:
target:
- os: windows-2022
triple: x86_64-pc-windows-msvc
- os: ubuntu-22.04
triple: x86_64-unknown-linux-gnu
- os: macos-12
triple: x86_64-apple-darwin
runs-on: ${{ matrix.target.os }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: olegtarasov/get-tag@v2.1.4
id: get_tag_name
with:
tagRegex: "v(?<version>.*)"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox
- name: Build exe
run: |
nox -s build-exe -- --release --version ${{ steps.get_tag_name.outputs.version }}
- uses: ncipollo/release-action@v1
with:
allowUpdates: true
updateOnlyUnreleased: false
omitBody: true
artifacts: ".zip/*.zip"
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}