Skip to content

Commit d3eda73

Browse files
committed
ci(signpath): delete unsigned windows artifact after signing
1 parent 75017ac commit d3eda73

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/build-desktop-platforms.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
permissions:
9696
id-token: write
9797
contents: read
98+
actions: write
9899

99100
steps:
100101
# Fail loudly if any SignPath config is missing instead of letting the
@@ -147,6 +148,21 @@ jobs:
147148
retention-days: 30
148149
compression-level: 0
149150

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+
150166
build-macos:
151167
strategy:
152168
matrix:

0 commit comments

Comments
 (0)