From 5ac7e171b80f570d98f9abe26f3f4003f140b6e8 Mon Sep 17 00:00:00 2001 From: epalosh Date: Fri, 29 May 2026 15:19:45 -0500 Subject: [PATCH] Fix release workflow + bump to 0.2.1 The release workflow was invalid and never ran: the VirusTotal `scan` job used `secrets` in a job-level `if:`, which GitHub forbids, so the whole file failed to parse (0 jobs, every run a failure) and no installer was ever built. Move the key to job `env` and gate the step with `if: env.VT_API_KEY != ''` (env is allowed in a step `if`). Bump 0.2.0 -> 0.2.1 (pyproject, __init__, build/installer defaults, changelog). v0.2.0 was tagged but never shipped due to the broken workflow; 0.2.1 is the first build CI actually publishes. --- .github/workflows/release.yml | 11 +++++++++-- CHANGELOG.md | 7 ++++++- build/nuitka_build.ps1 | 4 ++-- installer/build_installer.ps1 | 4 ++-- installer/openfov.iss | 2 +- pyproject.toml | 2 +- src/openfov/__init__.py | 2 +- 7 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 652a78b..92fecc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -158,8 +158,14 @@ jobs: name: VirusTotal scan needs: build runs-on: ubuntu-latest - if: secrets.VT_API_KEY != '' timeout-minutes: 15 + # Do NOT gate this job with `if: secrets.VT_API_KEY != ''` -- the + # `secrets` context is not allowed in `if:` conditions, which makes the + # ENTIRE workflow file invalid (it parses to 0 jobs and every run fails + # before anything builds). Expose the key as env and gate the step + # instead; `env` IS allowed in a step-level `if`. + env: + VT_API_KEY: ${{ secrets.VT_API_KEY }} steps: - name: Download installer @@ -169,9 +175,10 @@ jobs: path: artifact - name: Scan via VirusTotal + if: env.VT_API_KEY != '' uses: crazy-max/ghaction-virustotal@v4 with: - vt_api_key: ${{ secrets.VT_API_KEY }} + vt_api_key: ${{ env.VT_API_KEY }} files: | artifact/*.exe diff --git a/CHANGELOG.md b/CHANGELOG.md index 3452df3..5092596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,12 @@ All notable changes to OpenFOV are documented here. Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). -## [0.2.0] — Head-tracking feel + game-contention performance +## [0.2.1] — Head-tracking feel + game-contention performance + +> First build actually published by CI. v0.2.0 was tagged but never +> shipped: the release workflow used `secrets` in a job `if:` condition, +> which GitHub rejects, so the file never parsed and no installer was ever +> built. Fixed in this release. ### Added - Global hotkey (default **F10**) to toggle inference on/off entirely. diff --git a/build/nuitka_build.ps1 b/build/nuitka_build.ps1 index 989506f..34a87c7 100644 --- a/build/nuitka_build.ps1 +++ b/build/nuitka_build.ps1 @@ -17,7 +17,7 @@ Where to write the standalone folder. Defaults to dist/. .PARAMETER Version - Version string baked into the exe metadata. Default 0.2.0.0. + Version string baked into the exe metadata. Default 0.2.1.0. .NOTES On CI (windows-latest), Python 3.12 + Nuitka 2.7+ should already be @@ -30,7 +30,7 @@ [CmdletBinding()] param( [string]$OutDir = "", - [string]$Version = "0.2.0.0", + [string]$Version = "0.2.1.0", [string]$PythonExe = "" ) diff --git a/installer/build_installer.ps1 b/installer/build_installer.ps1 index 0a0334c..eea660a 100644 --- a/installer/build_installer.ps1 +++ b/installer/build_installer.ps1 @@ -26,14 +26,14 @@ .PARAMETER Version Version string passed to Inno Setup via /DMyAppVersion. Defaults to - 0.2.0 -- keep in sync with pyproject.toml [project.version]. + 0.2.1 -- keep in sync with pyproject.toml [project.version]. #> [CmdletBinding()] param( [string]$ISCC = "C:\Program Files (x86)\Inno Setup 6\ISCC.exe", [switch]$SkipRedistDownload, - [string]$Version = "0.2.0" + [string]$Version = "0.2.1" ) $ErrorActionPreference = "Stop" diff --git a/installer/openfov.iss b/installer/openfov.iss index 7b57953..04d2fd6 100644 --- a/installer/openfov.iss +++ b/installer/openfov.iss @@ -26,7 +26,7 @@ #ifndef MyAppVersion ; Keep in sync with pyproject.toml [project.version]. CI can override ; with `iscc /DMyAppVersion=1.2.3 installer/openfov.iss`. - #define MyAppVersion "0.2.0" + #define MyAppVersion "0.2.1" #endif [Setup] diff --git a/pyproject.toml b/pyproject.toml index a20eb61..ec1bbe7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "openfov" -version = "0.2.0" +version = "0.2.1" description = "Webcam head tracking for iRacing and other sim/flight games." readme = "README.md" requires-python = ">=3.11" diff --git a/src/openfov/__init__.py b/src/openfov/__init__.py index a0e4d11..ee65d25 100644 --- a/src/openfov/__init__.py +++ b/src/openfov/__init__.py @@ -1,3 +1,3 @@ """OpenFOV — webcam head tracking for sim/flight games.""" -__version__ = "0.2.0" +__version__ = "0.2.1"