@@ -63,14 +63,27 @@ jobs:
6363 retry ./gradlew :composeApp:packageExe :composeApp:packageMsi
6464 shell : bash
6565
66+ # Flatten .exe + .msi into a single directory so the uploaded artifact
67+ # zip contains them at the root (no `exe/` and `msi/` subdirectories).
68+ # SignPath's artifact-configuration XML uses simple `*.exe` / `*.msi`
69+ # globs at zip root; nested paths cause "Expected path to match exactly
70+ # 1 item, but found 0" because upload-artifact@v4 strips the longest
71+ # common prefix only, so multi-source paths preserve their tail dirs.
72+ - name : Stage Windows installers for upload
73+ run : |
74+ set -euo pipefail
75+ mkdir -p windows-staging
76+ cp composeApp/build/compose/binaries/main/exe/*.exe windows-staging/
77+ cp composeApp/build/compose/binaries/main/msi/*.msi windows-staging/
78+ ls -la windows-staging/
79+ shell : bash
80+
6681 - name : Upload Windows installers
6782 id : upload-windows
6883 uses : actions/upload-artifact@v4
6984 with :
7085 name : windows-installers
71- path : |
72- composeApp/build/compose/binaries/main/exe/*.exe
73- composeApp/build/compose/binaries/main/msi/*.msi
86+ path : windows-staging/*
7487 if-no-files-found : error
7588 retention-days : 30
7689 compression-level : 6
8295 permissions :
8396 id-token : write
8497 contents : read
98+ actions : write
8599
86100 steps :
87101 # Fail loudly if any SignPath config is missing instead of letting the
@@ -120,7 +134,7 @@ jobs:
120134 organization-id : ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
121135 project-slug : ' GitHub-Store'
122136 signing-policy-slug : ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}
123- artifact-configuration-slug : ' initial-version '
137+ artifact-configuration-slug : ' initial'
124138 github-artifact-id : ${{ needs.build-windows.outputs.windows-artifact-id }}
125139 wait-for-completion : true
126140 output-artifact-directory : signed-artifacts
@@ -134,6 +148,21 @@ jobs:
134148 retention-days : 30
135149 compression-level : 0
136150
151+ # Remove the unsigned upload so only the SignPath-signed installers are
152+ # downloadable from the run page and end up in the draft release.
153+ # Without this, both windows-installers (unsigned) and
154+ # windows-installers-signed coexist as 30-day artifacts.
155+ - name : Delete unsigned Windows artifact
156+ env :
157+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
158+ ARTIFACT_ID : ${{ needs.build-windows.outputs.windows-artifact-id }}
159+ REPO : ${{ github.repository }}
160+ run : |
161+ set -euo pipefail
162+ gh api -X DELETE "repos/${REPO}/actions/artifacts/${ARTIFACT_ID}"
163+ echo "Deleted unsigned artifact id=${ARTIFACT_ID}"
164+ shell : bash
165+
137166 build-macos :
138167 strategy :
139168 matrix :
0 commit comments