Skip to content

Merge remote-tracking branch 'origin/main' into feature-maafw #47

Merge remote-tracking branch 'origin/main' into feature-maafw

Merge remote-tracking branch 'origin/main' into feature-maafw #47

name: Build and Release
on:
push:
branches:
- "**"
tags:
- "v*"
jobs:
build:
runs-on: windows-latest
env:
PYTHONUTF8: "1"
PYTHONIOENCODING: utf-8
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b
- name: Install dependencies
run: uv sync --group dev
- name: Build with PyInstaller
run: uv run tools/package.py
- name: Upload build artifact
uses: actions/upload-artifact@v7
with:
name: cannotmax-build
path: output/main/
retention-days: 1
release:
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: windows-latest
steps:
- name: Download build artifact
uses: actions/download-artifact@v8
with:
name: cannotmax-build
path: cannotmax-build/
- name: Create GitHub Release
uses: softprops/action-gh-release@v3
with:
tag_name: ${{ github.ref_name }}
prerelease: ${{ contains(github.ref_name, '-') }}
files: cannotmax-build/**