@@ -36,11 +36,57 @@ jobs:
3636 echo "version=$version" >> $env:GITHUB_OUTPUT
3737 echo "Version: $version"
3838
39- - name : Build portable distribution for Scoop
39+ - name : Build portable distribution for Scoop (unsigned)
4040 shell : pwsh
4141 run : ./build-portable.ps1 -Version ${{ steps.version.outputs.version }}
4242
43- - name : Create GitHub Release with portable ZIP
43+ - name : Upload unsigned portable artifacts
44+ id : upload-portable
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : unsigned-portable-${{ steps.version.outputs.version }}
48+ path : Symlinker/bin/portable/
49+
50+ - name : Sign portable executable
51+ id : signpath-portable
52+ uses : signpath/github-action-submit-signing-request@v1
53+ with :
54+ api-token : ' ${{ secrets.SIGNPATH_API_TOKEN }}'
55+ organization-id : ' ${{ secrets.SIGNPATH_ORGANIZATION_ID }}'
56+ project-slug : ' ${{ secrets.SIGNPATH_PROJECT_SLUG }}'
57+ signing-policy-slug : ' ${{ secrets.SIGNPATH_SIGNING_POLICY_SLUG }}'
58+ artifact-configuration-slug : ' Portable'
59+ github-artifact-id : ' ${{ steps.upload-portable.outputs.artifact-id }}'
60+ wait-for-completion : true
61+ output-artifact-directory : ' Symlinker/bin/portable-signed'
62+ parameters : |
63+ {
64+ "version": "${{ steps.version.outputs.version }}"
65+ }
66+
67+ - name : Create signed portable ZIP
68+ shell : pwsh
69+ run : |
70+ $version = "${{ steps.version.outputs.version }}"
71+ $zipName = "symlinker-$version-portable.zip"
72+
73+ # Remove unsigned ZIP if exists
74+ if (Test-Path $zipName) {
75+ Remove-Item $zipName -Force
76+ }
77+
78+ # Create ZIP from signed artifacts
79+ Add-Type -AssemblyName System.IO.Compression.FileSystem
80+ [System.IO.Compression.ZipFile]::CreateFromDirectory(
81+ (Resolve-Path "Symlinker/bin/portable-signed").Path,
82+ (Join-Path (Get-Location) $zipName),
83+ [System.IO.Compression.CompressionLevel]::Optimal,
84+ $false
85+ )
86+
87+ Write-Output "Created signed portable ZIP: $zipName"
88+
89+ - name : Create GitHub Release with signed portable ZIP
4490 uses : softprops/action-gh-release@v1
4591 with :
4692 files : symlinker-${{ steps.version.outputs.version }}-portable.zip
5096 env :
5197 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5298
53- - name : Run ClickOnce release script
99+ - name : Build ClickOnce package (unsigned)
100+ shell : pwsh
101+ run : ./release.ps1 -OnlyBuild
102+
103+ - name : Upload unsigned ClickOnce artifacts
104+ id : upload-clickonce
105+ uses : actions/upload-artifact@v4
106+ with :
107+ name : unsigned-clickonce-${{ steps.version.outputs.version }}
108+ path : Symlinker/bin/publish/
109+
110+ - name : Submit signing request to SignPath
111+ id : signpath
112+ uses : signpath/github-action-submit-signing-request@v1
113+ with :
114+ api-token : ' ${{ secrets.SIGNPATH_API_TOKEN }}'
115+ organization-id : ' ${{ secrets.SIGNPATH_ORGANIZATION_ID }}'
116+ project-slug : ' ${{ secrets.SIGNPATH_PROJECT_SLUG }}'
117+ signing-policy-slug : ' ${{ secrets.SIGNPATH_SIGNING_POLICY_SLUG }}'
118+ artifact-configuration-slug : ' ClickOnce'
119+ github-artifact-id : ' ${{ steps.upload-clickonce.outputs.artifact-id }}'
120+ wait-for-completion : true
121+ output-artifact-directory : ' signed-clickonce'
122+ parameters : |
123+ {
124+ "version": "${{ steps.version.outputs.version }}"
125+ }
126+
127+ - name : Deploy signed ClickOnce to gh-pages
54128 shell : pwsh
55- run : ./release.ps1
129+ run : ./release.ps1 -SignedArtifactDir "signed-clickonce"
0 commit comments