@@ -36,11 +36,55 @@ 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+ version: ${{ toJSON(steps.version.outputs.version) }}
64+
65+ - name : Create signed portable ZIP
66+ shell : pwsh
67+ run : |
68+ $version = "${{ steps.version.outputs.version }}"
69+ $zipName = "symlinker-$version-portable.zip"
70+
71+ # Remove unsigned ZIP if exists
72+ if (Test-Path $zipName) {
73+ Remove-Item $zipName -Force
74+ }
75+
76+ # Create ZIP from signed artifacts
77+ Add-Type -AssemblyName System.IO.Compression.FileSystem
78+ [System.IO.Compression.ZipFile]::CreateFromDirectory(
79+ (Resolve-Path "Symlinker/bin/portable-signed").Path,
80+ (Join-Path (Get-Location) $zipName),
81+ [System.IO.Compression.CompressionLevel]::Optimal,
82+ $false
83+ )
84+
85+ Write-Output "Created signed portable ZIP: $zipName"
86+
87+ - name : Create GitHub Release with signed portable ZIP
4488 uses : softprops/action-gh-release@v1
4589 with :
4690 files : symlinker-${{ steps.version.outputs.version }}-portable.zip
5094 env :
5195 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5296
53- - name : Run ClickOnce release script
97+ - name : Build ClickOnce package (unsigned)
98+ shell : pwsh
99+ run : ./release.ps1 -OnlyBuild
100+
101+ - name : Upload unsigned ClickOnce artifacts
102+ id : upload-clickonce
103+ uses : actions/upload-artifact@v4
104+ with :
105+ name : unsigned-clickonce-${{ steps.version.outputs.version }}
106+ path : Symlinker/bin/publish/
107+
108+ - name : Submit signing request to SignPath
109+ id : signpath
110+ uses : signpath/github-action-submit-signing-request@v1
111+ with :
112+ api-token : ' ${{ secrets.SIGNPATH_API_TOKEN }}'
113+ organization-id : ' ${{ secrets.SIGNPATH_ORGANIZATION_ID }}'
114+ project-slug : ' ${{ secrets.SIGNPATH_PROJECT_SLUG }}'
115+ signing-policy-slug : ' ${{ secrets.SIGNPATH_SIGNING_POLICY_SLUG }}'
116+ artifact-configuration-slug : ' ClickOnce'
117+ github-artifact-id : ' ${{ steps.upload-clickonce.outputs.artifact-id }}'
118+ wait-for-completion : true
119+ output-artifact-directory : ' signed-clickonce'
120+ parameters : |
121+ version: ${{ toJSON(steps.version.outputs.version) }}
122+
123+ - name : Deploy signed ClickOnce to gh-pages
54124 shell : pwsh
55- run : ./release.ps1
125+ run : ./release.ps1 -SignedArtifactDir "signed-clickonce"
0 commit comments