All checks were successful
Build Windows EXE / build (push) Successful in 48s
Discard response body with --output NUL and capture HTTP status code via --write-out to avoid curl failing on connection reset after upload. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
37 lines
996 B
YAML
37 lines
996 B
YAML
name: Build Windows EXE
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Build EXE
|
|
run: pyinstaller es24n_conf.spec
|
|
|
|
- name: Publish to Gitea generic registry
|
|
run: |
|
|
$status = curl.exe --silent --user "${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_TOKEN }}" `
|
|
--upload-file dist\es24n_conf.exe `
|
|
--output NUL `
|
|
--write-out "%{http_code}" `
|
|
"${{ github.server_url }}/api/packages/${{ github.repository_owner }}/generic/es24n-conf-windows/${{ github.run_number }}/es24n_conf.exe"
|
|
Write-Host "HTTP status: $status"
|
|
if ($status -ne "201") { exit 1 }
|