Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,17 @@ jobs:
gh release create "v${{ steps.version.outputs.VERSION }}" --title "v${{ steps.version.outputs.VERSION }}" --generate-notes --target main

- name: Setup .NET 8.0
if: steps.check.outputs.EXISTS == 'false'
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build and test
if: steps.check.outputs.EXISTS == 'false'
run: |
dotnet restore
dotnet build -c Release
dotnet test tests/PlanViewer.Core.Tests/PlanViewer.Core.Tests.csproj -c Release --no-build --verbosity normal

- name: Publish App (all platforms)
if: steps.check.outputs.EXISTS == 'false'
run: |
dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r win-x64 --self-contained -o publish/win-x64
dotnet publish src/PlanViewer.App/PlanViewer.App.csproj -c Release -r linux-x64 --self-contained -o publish/linux-x64
Expand All @@ -68,7 +65,6 @@ jobs:

# ── SignPath code signing (Windows only, skipped if secret not configured) ──
- name: Check if signing is configured
if: steps.check.outputs.EXISTS == 'false'
id: signing
shell: bash
run: |
Expand All @@ -80,15 +76,15 @@ jobs:
fi

- name: Upload Windows build for signing
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
if: steps.signing.outputs.ENABLED == 'true'
id: upload-unsigned
uses: actions/upload-artifact@v4
with:
name: App-unsigned
path: publish/win-x64/
Comment on lines 78 to 84
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/upload-artifact@v4 requires unique artifact names within a workflow run. The target failure scenario here is "SignPath times out on attempt 1, user reruns" — if that rerun is done via GitHub's "Re-run failed jobs" (same run, attempt 2), the prior attempt's App-unsigned artifact persists and this step will fail with an artifact with this name already exists. Consider adding overwrite: true here to make the rerun path fully idempotent. A fresh workflow_dispatch run is unaffected, but "Re-run failed jobs" is the more likely maintainer action.


Generated by Claude Code


- name: Sign Windows build
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
if: steps.signing.outputs.ENABLED == 'true'
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
Expand All @@ -101,15 +97,14 @@ jobs:
output-artifact-directory: 'signed/win-x64'

- name: Replace unsigned Windows build with signed
if: steps.check.outputs.EXISTS == 'false' && steps.signing.outputs.ENABLED == 'true'
if: steps.signing.outputs.ENABLED == 'true'
shell: pwsh
run: |
Remove-Item -Recurse -Force publish/win-x64
Copy-Item -Recurse signed/win-x64 publish/win-x64

# ── Velopack (uses signed Windows binaries) ───────────────────────
- name: Create Velopack release (Windows)
if: steps.check.outputs.EXISTS == 'false'
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -126,7 +121,6 @@ jobs:

# ── Package and upload ────────────────────────────────────────────
- name: Package and upload
if: steps.check.outputs.EXISTS == 'false'
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading