Complete NEC antenna modeling milestone for 0.42.0 #7
Workflow file for this run
This file contains hidden or 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: Windows release | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: | |
| contents: write | |
| id-token: write | |
| attestations: write | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Check out source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| cache: pip | |
| - name: Install dependencies | |
| run: python -m pip install -e ".[dev]" | |
| - name: Verify tag and project version | |
| shell: pwsh | |
| run: | | |
| $project = Get-Content pyproject.toml -Raw | |
| $version = [regex]::Match($project, '(?m)^version\s*=\s*"([^"]+)"').Groups[1].Value | |
| if (-not $version) { throw "Project version was not found." } | |
| if ("v$version" -ne "${{ github.ref_name }}") { | |
| throw "Tag ${{ github.ref_name }} does not match project version $version." | |
| } | |
| - name: Test | |
| env: | |
| QT_QPA_PLATFORM: offscreen | |
| run: python -m pytest | |
| - name: Build application | |
| run: pyinstaller --noconfirm AntennaPatternLab.spec | |
| - name: Install Inno Setup | |
| id: tools | |
| shell: pwsh | |
| run: | | |
| choco install innosetup --no-progress -y | |
| $iscc = Get-Item "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" | |
| if (-not $iscc) { throw "Inno Setup was not found." } | |
| "iscc=$($iscc.FullName)" >> $env:GITHUB_OUTPUT | |
| - name: Build installer and update manifest | |
| shell: pwsh | |
| run: | | |
| .\build_installer.ps1 ` | |
| -Compiler "${{ steps.tools.outputs.iscc }}" ` | |
| -ReleaseBaseUrl "https://github.com/bubakbubak500/AntennaPatternLab/releases/latest/download" | |
| - name: Package application and publish checksums | |
| shell: pwsh | |
| run: | | |
| $project = Get-Content pyproject.toml -Raw | |
| $version = [regex]::Match($project, '(?m)^version\s*=\s*"([^"]+)"').Groups[1].Value | |
| $installer = "release\AntennaPatternLab-$version-setup-win-x64.exe" | |
| $signature = Get-AuthenticodeSignature -FilePath $installer | |
| if ($signature.Status -ne "NotSigned") { | |
| throw "Unexpected installer signing state: $($signature.Status)" | |
| } | |
| Compress-Archive -Path "dist\AntennaPatternLab\*" ` | |
| -DestinationPath "release\AntennaPatternLab-$version-win-x64.zip" | |
| Get-ChildItem release\AntennaPatternLab-$version-* | | |
| Get-FileHash -Algorithm SHA256 | | |
| ForEach-Object { "$($_.Hash.ToLowerInvariant()) $([IO.Path]::GetFileName($_.Path))" } | | |
| Set-Content release\SHA256SUMS.txt -Encoding ascii | |
| - name: Attest release build provenance | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: | | |
| release/AntennaPatternLab-*-setup-win-x64.exe | |
| release/AntennaPatternLab-*-win-x64.zip | |
| - name: Publish GitHub Release | |
| shell: pwsh | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| $project = Get-Content pyproject.toml -Raw | |
| $version = [regex]::Match($project, '(?m)^version\s*=\s*"([^"]+)"').Groups[1].Value | |
| gh release create "${{ github.ref_name }}" ` | |
| "release\AntennaPatternLab-$version-setup-win-x64.exe" ` | |
| "release\AntennaPatternLab-$version-win-x64.zip" ` | |
| "release\release-manifest.json" ` | |
| "release\SHA256SUMS.txt" ` | |
| --title "Antenna Pattern Lab $version" ` | |
| --notes-file "docs\RELEASE_NOTES_$version.md" ` | |
| --latest ` | |
| --verify-tag |