An open-source cross-platform alternative to AirDrop
ci: Azure signing
Tien Do Namebdf5f814632
diff --git a/.github/workflows/build_cli_exe_test.yml b/.github/workflows/build_cli_exe_test.ymlindex a51432f4..1e60a6e1 100644--- a/.github/workflows/build_cli_exe_test.yml+++ b/.github/workflows/build_cli_exe_test.yml@@ -32,6 +32,9 @@ jobs:signtool_arch: arm64runs-on: ${{ matrix.runner }}environment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Checkout repository@@ -43,38 +46,37 @@ jobs:- name: Compile CLIrun: cargo build --release --package localsend-cli- # The SignPath artifact configuration expects "LocalSend-CLI-*-windows-*-64.exe"- name: Rename CLI executablerun: Rename-Item -Path "target\release\localsend-cli.exe" -NewName "LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"- - name: Upload unsigned CLI- id: unsigned-cli- uses: actions/upload-artifact@v6+ - name: Azure login+ uses: azure/login@v2with:- name: windows-cli-exe-${{ matrix.suffix }}-unsigned- path: target\release\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe- if-no-files-found: error+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}- - name: Sign CLI (SignPath)- uses: signpath/github-action-submit-signing-request@v2+ - name: Sign CLI (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0with:- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- organization-id: ${{ vars.SIGNPATH_ORG_ID }}- project-slug: localsend- signing-policy-slug: test-signing- artifact-configuration-slug: cli- github-artifact-id: ${{ steps.unsigned-cli.outputs.artifact-id }}- wait-for-completion: true- output-artifact-directory: signed/cli+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\target\release+ files-folder-filter: exe+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256- name: Verify signaturecontinue-on-error: truerun: |$signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\${{ matrix.signtool_arch }}\signtool.exe' | Select-Object -Last 1- & $signtool.FullName verify /pa /v "signed\cli\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"+ & $signtool.FullName verify /pa /v "target\release\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"- name: Upload signed CLIuses: actions/upload-artifact@v6with:name: windows-cli-exe-${{ matrix.suffix }}-result- path: signed/cli/LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe+ path: target\release\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe+ if-no-files-found: errordiff --git a/.github/workflows/build_exe_test.yml b/.github/workflows/build_exe_test.ymlindex f361c6a3..8944eed2 100644--- a/.github/workflows/build_exe_test.yml+++ b/.github/workflows/build_exe_test.yml@@ -25,6 +25,9 @@ jobs:needs: buildruns-on: windows-latestenvironment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Fix long file paths@@ -38,16 +41,12 @@ jobs:flutter-version: ${{ env.FLUTTER_VERSION }}channel: "stable"- # The MSIX publisher must match the subject of the signing certificate.- # The manifests in the repo carry the release certificate subject; test-signing- # uses SignPath's self-issued test certificate, so patch both manifests here.- - name: Patch MSIX publisher for test certificate- run: |- $subject = 'CN=Test certificate for ''LocalSend [OSS]'''- $manifest = 'support\build\msix\content\AppxManifest.xml'- $exeManifest = 'app\windows\localsend_app.exe.manifest'- (Get-Content $manifest -Raw) -creplace 'Publisher="[^"]+"', ('Publisher="' + $subject + '"') | Set-Content $manifest -Encoding utf8- (Get-Content $exeManifest -Raw) -creplace 'publisher="[^"]+"', ('publisher="' + $subject + '"') | Set-Content $exeManifest -Encoding utf8+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}- name: Build MSIX helperrun: |@@ -55,29 +54,20 @@ jobs:& $makepri.FullName new /pr support\build\msix\content /cf support\build\msix\priconfig.xml /mn support\build\msix\content\AppxManifest.xml /of support\build\msix\content\resources.pri /o& 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe' pack /o /d support\build\msix\content /nv /p app\windows\localsend_msix_helper.msix- # The sparse package needs its own signature (Add-AppxPackage rejects unsigned packages)- - name: Upload unsigned MSIX helper- id: unsigned-msix- uses: actions/upload-artifact@v6- with:- name: windows-msix-helper-unsigned- path: app\windows\localsend_msix_helper.msix- if-no-files-found: error-- - name: Sign MSIX helper (SignPath)- uses: signpath/github-action-submit-signing-request@v2+ # The sparse package needs its own signature (Add-AppxPackage rejects unsigned packages);+ # signing the surrounding installer does not cover it. Sign before "flutter build windows"+ # so CMake bundles the signed msix into the Release directory.+ - name: Sign MSIX helper (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0with:- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- organization-id: ${{ vars.SIGNPATH_ORG_ID }}- project-slug: localsend- signing-policy-slug: test-signing- artifact-configuration-slug: msix-helper- github-artifact-id: ${{ steps.unsigned-msix.outputs.artifact-id }}- wait-for-completion: true- output-artifact-directory: signed/msix-helper-- - name: Replace MSIX helper with signed version- run: Copy-Item -Force signed\msix-helper\localsend_msix_helper.msix app\windows\localsend_msix_helper.msix+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\windows+ files-folder-filter: msix+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256- name: Verify MSIX signaturecontinue-on-error: true@@ -93,6 +83,18 @@ jobs:working-directory: apprun: flutter build windows+ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\x64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256+- name: Prepare Inno Setup payloadrun: |New-Item -ItemType Directory -Force -Path "${{ runner.temp }}\inno" | Out-Null@@ -104,38 +106,30 @@ jobs:- name: Compile installer (unsigned)run: iscc /DSkipSignTool "/DPayloadDir=${{ runner.temp }}\inno" "/DResultDir=${{ runner.temp }}\inno-result" support\scripts\compile_windows_exe-inno.iss- # The SignPath artifact configuration expects "LocalSend-*-windows-x86-64.exe"- name: Rename installerrun: Rename-Item -Path "${{ runner.temp }}\inno-result\localsend.exe" -NewName "LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"- - name: Upload unsigned installer- id: unsigned-installer- uses: actions/upload-artifact@v6+ - name: Sign installer (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0with:- name: windows-exe-unsigned- path: ${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe- if-no-files-found: error-- - name: Sign installer (SignPath)- uses: signpath/github-action-submit-signing-request@v2- with:- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- organization-id: ${{ vars.SIGNPATH_ORG_ID }}- project-slug: localsend- signing-policy-slug: test-signing- artifact-configuration-slug: installer- github-artifact-id: ${{ steps.unsigned-installer.outputs.artifact-id }}- wait-for-completion: true- output-artifact-directory: signed/installer+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ runner.temp }}\inno-result+ files-folder-filter: exe+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256- name: Verify signaturecontinue-on-error: truerun: |$signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1- & $signtool.FullName verify /pa /v "signed\installer\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"+ & $signtool.FullName verify /pa /v "${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"- name: Upload signed installeruses: actions/upload-artifact@v6with:name: windows-exe-x86-64-result- path: signed/installer/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe+ path: ${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe+ if-no-files-found: errordiff --git a/.github/workflows/build_zip_arm64_test.yml b/.github/workflows/build_zip_arm64_test.ymlindex 27b01d65..2d85b799 100644--- a/.github/workflows/build_zip_arm64_test.yml+++ b/.github/workflows/build_zip_arm64_test.yml@@ -27,6 +27,9 @@ jobs:needs: buildruns-on: windows-11-armenvironment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Fix long file paths@@ -67,6 +70,32 @@ jobs:working-directory: apprun: flutter build windows+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ # Sign before "Add DLL files" so the Microsoft-signed CRT DLLs keep their original signature+ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\arm64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\arm64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v app\build\windows\arm64\runner\Release\localsend_app.exe+- name: Create empty settings.jsonworking-directory: apprun: echo {} > build/windows/arm64/runner/Release/settings.json@@ -92,36 +121,9 @@ jobs:working-directory: apprun: Compress-Archive -Path build/windows/arm64/runner/Release/* -DestinationPath "LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip"- - name: Upload unsigned zip- id: unsigned-zip- uses: actions/upload-artifact@v6- with:- name: windows-zip-arm-64-unsigned- path: app/LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip- if-no-files-found: error-- # The SignPath artifact configuration expects "LocalSend-*-windows-*-64.zip" containing "localsend_app.exe"- - name: Sign zip (SignPath)- uses: signpath/github-action-submit-signing-request@v2- with:- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- organization-id: ${{ vars.SIGNPATH_ORG_ID }}- project-slug: localsend- signing-policy-slug: test-signing- artifact-configuration-slug: portable- github-artifact-id: ${{ steps.unsigned-zip.outputs.artifact-id }}- wait-for-completion: true- output-artifact-directory: signed/portable-- - name: Verify signature- continue-on-error: true- run: |- Expand-Archive -Path "signed\portable\LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip" -DestinationPath verify-portable- $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\arm64\signtool.exe' | Select-Object -Last 1- & $signtool.FullName verify /pa /v verify-portable\localsend_app.exe-- name: Upload signed zipuses: actions/upload-artifact@v6with:name: windows-zip-arm-64-result- path: signed/portable/LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip+ path: app/LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip+ if-no-files-found: errordiff --git a/.github/workflows/build_zip_test.yml b/.github/workflows/build_zip_test.ymlindex 9c8f4392..7cffc79f 100644--- a/.github/workflows/build_zip_test.yml+++ b/.github/workflows/build_zip_test.yml@@ -25,6 +25,9 @@ jobs:needs: buildruns-on: windows-latestenvironment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Fix long file paths@@ -53,6 +56,32 @@ jobs:working-directory: apprun: flutter build windows+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ # Sign before "Add DLL files" so the Microsoft-signed CRT DLLs keep their original signature+ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\x64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v app\build\windows\x64\runner\Release\localsend_app.exe+- name: Create empty settings.jsonworking-directory: apprun: echo {} > build/windows/x64/runner/Release/settings.json@@ -72,40 +101,13 @@ jobs:Remove-Item build/windows/x64/runner/Release/install_msix_helper.ps1Remove-Item build/windows/x64/runner/Release/localsend_app.exe.manifest- # The SignPath artifact configuration expects "LocalSend-*-windows-*-64.zip" containing "localsend_app.exe"- name: Zip compiled filesworking-directory: apprun: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath "LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip"- - name: Upload unsigned zip- id: unsigned-zip- uses: actions/upload-artifact@v6- with:- name: windows-zip-unsigned- path: app/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip- if-no-files-found: error-- - name: Sign zip (SignPath)- uses: signpath/github-action-submit-signing-request@v2- with:- api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- organization-id: ${{ vars.SIGNPATH_ORG_ID }}- project-slug: localsend- signing-policy-slug: test-signing- artifact-configuration-slug: portable- github-artifact-id: ${{ steps.unsigned-zip.outputs.artifact-id }}- wait-for-completion: true- output-artifact-directory: signed/portable-- - name: Verify signature- continue-on-error: true- run: |- Expand-Archive -Path "signed\portable\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip" -DestinationPath verify-portable- $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1- & $signtool.FullName verify /pa /v verify-portable\localsend_app.exe-- name: Upload signed zipuses: actions/upload-artifact@v6with:name: windows-zip-x86-64-result- path: signed/portable/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip+ path: app/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip+ if-no-files-found: errordiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 3dace942..176a24ec 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -358,6 +358,9 @@ jobs:needs: buildruns-on: windows-latestenvironment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Fix long file paths@@ -386,6 +389,32 @@ jobs:working-directory: apprun: flutter build windows+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ # Sign before "Add DLL files" so the Microsoft-signed CRT DLLs keep their original signature+ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\x64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v app\build\windows\x64\runner\Release\localsend_app.exe+- name: Create empty settings.jsonworking-directory: apprun: echo {} > build/windows/x64/runner/Release/settings.json@@ -405,39 +434,10 @@ jobs:Remove-Item build/windows/x64/runner/Release/install_msix_helper.ps1Remove-Item build/windows/x64/runner/Release/localsend_app.exe.manifest- # The SignPath artifact configuration expects "LocalSend-*-windows-*-64.zip" containing "localsend_app.exe"- name: Zip compiled filesworking-directory: apprun: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath "LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip"- # Signing temporarily disabled: the unsigned zip is uploaded as the result- # - name: Upload unsigned zip- # id: unsigned-zip- # uses: actions/upload-artifact@v6- # with:- # name: windows-zip-unsigned- # path: app/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip- # if-no-files-found: error- #- # - name: Sign zip (SignPath)- # uses: signpath/github-action-submit-signing-request@v2- # with:- # api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- # organization-id: ${{ vars.SIGNPATH_ORG_ID }}- # project-slug: localsend- # signing-policy-slug: release-signing- # artifact-configuration-slug: portable- # github-artifact-id: ${{ steps.unsigned-zip.outputs.artifact-id }}- # wait-for-completion: true- # output-artifact-directory: signed/portable- #- # - name: Verify signature- # continue-on-error: true- # run: |- # Expand-Archive -Path "signed\portable\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zip" -DestinationPath verify-portable- # $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1- # & $signtool.FullName verify /pa /v verify-portable\localsend_app.exe-- name: Upload zipuses: actions/upload-artifact@v6with:@@ -449,6 +449,9 @@ jobs:needs: buildruns-on: windows-11-armenvironment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: read# Windows ARM64 requires beta: stable (3.41.9) has no windows-arm64 artifacts and silently falls back to an x64 build.# Switch back to the shared stable FLUTTER_VERSION once windows-arm64 reaches stable.@@ -494,6 +497,32 @@ jobs:working-directory: apprun: flutter build windows+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ # Sign before "Add DLL files" so the Microsoft-signed CRT DLLs keep their original signature+ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\arm64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\arm64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v app\build\windows\arm64\runner\Release\localsend_app.exe+- name: Create empty settings.jsonworking-directory: apprun: echo {} > build/windows/arm64/runner/Release/settings.json@@ -515,39 +544,10 @@ jobs:Remove-Item build/windows/arm64/runner/Release/install_msix_helper.ps1Remove-Item build/windows/arm64/runner/Release/localsend_app.exe.manifest- # The SignPath artifact configuration expects "LocalSend-*-windows-*-64.zip" containing "localsend_app.exe"- name: Zip compiled filesworking-directory: apprun: Compress-Archive -Path build/windows/arm64/runner/Release/* -DestinationPath "LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip"- # Signing temporarily disabled: the unsigned zip is uploaded as the result- # - name: Upload unsigned zip- # id: unsigned-zip- # uses: actions/upload-artifact@v6- # with:- # name: windows-zip-arm-64-unsigned- # path: app/LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip- # if-no-files-found: error- #- # - name: Sign zip (SignPath)- # uses: signpath/github-action-submit-signing-request@v2- # with:- # api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- # organization-id: ${{ vars.SIGNPATH_ORG_ID }}- # project-slug: localsend- # signing-policy-slug: release-signing- # artifact-configuration-slug: portable- # github-artifact-id: ${{ steps.unsigned-zip.outputs.artifact-id }}- # wait-for-completion: true- # output-artifact-directory: signed/portable- #- # - name: Verify signature- # continue-on-error: true- # run: |- # Expand-Archive -Path "signed\portable\LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zip" -DestinationPath verify-portable- # $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\arm64\signtool.exe' | Select-Object -Last 1- # & $signtool.FullName verify /pa /v verify-portable\localsend_app.exe-- name: Upload zipuses: actions/upload-artifact@v6with:@@ -555,116 +555,118 @@ jobs:path: app/LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zipif-no-files-found: error- # Installer temporarily disabled: releasing without code signing for now- # build_windows_exe_x86_64:- # needs: build- # runs-on: windows-latest- # environment: packaging-- # steps:- # - name: Fix long file paths- # run: git config --system core.longpaths true-- # - name: Checkout repository- # uses: actions/checkout@v6-- # - uses: subosito/flutter-action@v2- # with:- # flutter-version: ${{ env.FLUTTER_VERSION }}- # channel: "stable"-- # - name: Build MSIX helper- # run: |- # $makepri = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\makepri.exe' | Select-Object -Last 1- # & $makepri.FullName new /pr support\build\msix\content /cf support\build\msix\priconfig.xml /mn support\build\msix\content\AppxManifest.xml /of support\build\msix\content\resources.pri /o- # & 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe' pack /o /d support\build\msix\content /nv /p app\windows\localsend_msix_helper.msix-- # # The sparse package needs its own signature (Add-AppxPackage rejects unsigned packages);- # # signing the surrounding installer does not cover it. Sign before "flutter build windows"- # # so CMake bundles the signed msix into the Release directory.- # - name: Upload unsigned MSIX helper- # id: unsigned-msix- # uses: actions/upload-artifact@v6- # with:- # name: windows-msix-helper-unsigned- # path: app\windows\localsend_msix_helper.msix- # if-no-files-found: error-- # - name: Sign MSIX helper (SignPath)- # uses: signpath/github-action-submit-signing-request@v2- # with:- # api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- # organization-id: ${{ vars.SIGNPATH_ORG_ID }}- # project-slug: localsend- # signing-policy-slug: release-signing- # artifact-configuration-slug: msix-helper- # github-artifact-id: ${{ steps.unsigned-msix.outputs.artifact-id }}- # wait-for-completion: true- # output-artifact-directory: signed/msix-helper-- # - name: Replace MSIX helper with signed version- # run: Copy-Item -Force signed\msix-helper\localsend_msix_helper.msix app\windows\localsend_msix_helper.msix-- # - name: Verify MSIX signature- # continue-on-error: true- # run: |- # $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1- # & $signtool.FullName verify /pa /v app\windows\localsend_msix_helper.msix-- # - name: Dependencies- # working-directory: app- # run: flutter pub get-- # - name: Compile for Windows- # working-directory: app- # run: flutter build windows-- # - name: Prepare Inno Setup payload- # run: |- # New-Item -ItemType Directory -Force -Path "${{ runner.temp }}\inno" | Out-Null- # Copy-Item -Path "app\build\windows\x64\runner\Release\*" -Destination "${{ runner.temp }}\inno" -Recurse- # Copy-Item -Path "app\assets\packaging\logo.ico" -Destination "${{ runner.temp }}\inno"- # Copy-Item -Path "support\build\windows\x64\*" -Destination "${{ runner.temp }}\inno" -Recurse- # New-Item -ItemType Directory -Force -Path "${{ runner.temp }}\inno-result" | Out-Null-- # - name: Compile installer (unsigned)- # run: iscc /DSkipSignTool "/DPayloadDir=${{ runner.temp }}\inno" "/DResultDir=${{ runner.temp }}\inno-result" support\scripts\compile_windows_exe-inno.iss-- # # The SignPath artifact configuration expects "LocalSend-*-windows-x86-64.exe"- # - name: Rename installer- # run: Rename-Item -Path "${{ runner.temp }}\inno-result\localsend.exe" -NewName "LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"-- # - name: Upload unsigned installer- # id: unsigned-installer- # uses: actions/upload-artifact@v6- # with:- # name: windows-exe-unsigned- # path: ${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe- # if-no-files-found: error-- # - name: Sign installer (SignPath)- # uses: signpath/github-action-submit-signing-request@v2- # with:- # api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- # organization-id: ${{ vars.SIGNPATH_ORG_ID }}- # project-slug: localsend- # signing-policy-slug: release-signing- # artifact-configuration-slug: installer- # github-artifact-id: ${{ steps.unsigned-installer.outputs.artifact-id }}- # wait-for-completion: true- # output-artifact-directory: signed/installer-- # - name: Verify signature- # continue-on-error: true- # run: |- # $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1- # & $signtool.FullName verify /pa /v "signed\installer\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"-- # - name: Upload signed installer- # uses: actions/upload-artifact@v6- # with:- # name: windows-exe-x86-64-result- # path: signed/installer/LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe+ build_windows_exe_x86_64:+ needs: build+ runs-on: windows-latest+ environment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: read++ steps:+ - name: Fix long file paths+ run: git config --system core.longpaths true++ - name: Checkout repository+ uses: actions/checkout@v6++ - uses: subosito/flutter-action@v2+ with:+ flutter-version: ${{ env.FLUTTER_VERSION }}+ channel: "stable"++ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ - name: Build MSIX helper+ run: |+ $makepri = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\makepri.exe' | Select-Object -Last 1+ & $makepri.FullName new /pr support\build\msix\content /cf support\build\msix\priconfig.xml /mn support\build\msix\content\AppxManifest.xml /of support\build\msix\content\resources.pri /o+ & 'C:\Program Files (x86)\Windows Kits\10\App Certification Kit\makeappx.exe' pack /o /d support\build\msix\content /nv /p app\windows\localsend_msix_helper.msix++ # The sparse package needs its own signature (Add-AppxPackage rejects unsigned packages);+ # signing the surrounding installer does not cover it. Sign before "flutter build windows"+ # so CMake bundles the signed msix into the Release directory.+ - name: Sign MSIX helper (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\windows+ files-folder-filter: msix+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify MSIX signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v app\windows\localsend_msix_helper.msix++ - name: Dependencies+ working-directory: app+ run: flutter pub get++ - name: Compile for Windows+ working-directory: app+ run: flutter build windows++ - name: Sign app binaries (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\app\build\windows\x64\runner\Release+ files-folder-filter: exe,dll+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Prepare Inno Setup payload+ run: |+ New-Item -ItemType Directory -Force -Path "${{ runner.temp }}\inno" | Out-Null+ Copy-Item -Path "app\build\windows\x64\runner\Release\*" -Destination "${{ runner.temp }}\inno" -Recurse+ Copy-Item -Path "app\assets\packaging\logo.ico" -Destination "${{ runner.temp }}\inno"+ Copy-Item -Path "support\build\windows\x64\*" -Destination "${{ runner.temp }}\inno" -Recurse+ New-Item -ItemType Directory -Force -Path "${{ runner.temp }}\inno-result" | Out-Null++ - name: Compile installer (unsigned)+ run: iscc /DSkipSignTool "/DPayloadDir=${{ runner.temp }}\inno" "/DResultDir=${{ runner.temp }}\inno-result" support\scripts\compile_windows_exe-inno.iss++ - name: Rename installer+ run: Rename-Item -Path "${{ runner.temp }}\inno-result\localsend.exe" -NewName "LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"++ - name: Sign installer (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ runner.temp }}\inno-result+ files-folder-filter: exe+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\x64\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v "${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe"++ - name: Upload signed installer+ uses: actions/upload-artifact@v6+ with:+ name: windows-exe-x86-64-result+ path: ${{ runner.temp }}\inno-result\LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe+ if-no-files-found: errorbuild_cli_linux:needs: build@@ -712,6 +714,9 @@ jobs:signtool_arch: arm64runs-on: ${{ matrix.runner }}environment: packaging+ permissions:+ id-token: write # OIDC token for Azure login+ contents: readsteps:- name: Checkout repository@@ -723,36 +728,33 @@ jobs:- name: Compile CLIrun: cargo build --release --package localsend-cli- # The SignPath artifact configuration expects "LocalSend-CLI-*-windows-*-64.exe"- name: Rename CLI executablerun: Rename-Item -Path "target\release\localsend-cli.exe" -NewName "LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"- # Signing temporarily disabled: the unsigned exe is uploaded as the result- # - name: Upload unsigned CLI- # id: unsigned-cli- # uses: actions/upload-artifact@v6- # with:- # name: windows-cli-exe-${{ matrix.suffix }}-unsigned- # path: target\release\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe- # if-no-files-found: error- #- # - name: Sign CLI (SignPath)- # uses: signpath/github-action-submit-signing-request@v2- # with:- # api-token: ${{ secrets.SIGNPATH_API_TOKEN }}- # organization-id: ${{ vars.SIGNPATH_ORG_ID }}- # project-slug: localsend- # signing-policy-slug: release-signing- # artifact-configuration-slug: cli- # github-artifact-id: ${{ steps.unsigned-cli.outputs.artifact-id }}- # wait-for-completion: true- # output-artifact-directory: signed/cli- #- # - name: Verify signature- # continue-on-error: true- # run: |- # $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\${{ matrix.signtool_arch }}\signtool.exe' | Select-Object -Last 1- # & $signtool.FullName verify /pa /v "signed\cli\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"+ - name: Azure login+ uses: azure/login@v2+ with:+ client-id: ${{ secrets.AZURE_CLIENT_ID }}+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}++ - name: Sign CLI (Azure Trusted Signing)+ uses: azure/trusted-signing-action@v0+ with:+ endpoint: https://neu.codesigning.azure.net/+ trusted-signing-account-name: tienisto+ certificate-profile-name: localsend+ files-folder: ${{ github.workspace }}\target\release+ files-folder-filter: exe+ file-digest: SHA256+ timestamp-rfc3161: http://timestamp.acs.microsoft.com+ timestamp-digest: SHA256++ - name: Verify signature+ continue-on-error: true+ run: |+ $signtool = Get-ChildItem 'C:\Program Files (x86)\Windows Kits\10\bin\10.*\${{ matrix.signtool_arch }}\signtool.exe' | Select-Object -Last 1+ & $signtool.FullName verify /pa /v "target\release\LocalSend-CLI-${{ needs.build.outputs.version }}-windows-${{ matrix.suffix }}.exe"- name: Upload CLIuses: actions/upload-artifact@v6@@ -772,7 +774,7 @@ jobs:- build_appimage_x86_64- build_windows_zip_x86_64- build_windows_zip_arm_64- # - build_windows_exe_x86_64+ - build_windows_exe_x86_64- build_cli_linux- build_cli_windows_exeruns-on: ubuntu-24.04@@ -963,7 +965,7 @@ jobs:asset_name: LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.zipasset_content_type: application/zip- # WINDOWS ZIP (arm_64, signed via SignPath)+ # WINDOWS ZIP (arm_64)- name: Download windows zip fileuses: actions/download-artifact@v7with:@@ -983,25 +985,25 @@ jobs:asset_name: LocalSend-${{ needs.build.outputs.version }}-windows-arm-64.zipasset_content_type: application/zip- # WINDOWS EXE (x86_64, signed via SignPath) — installer temporarily disabled- # - name: Download windows exe file- # uses: actions/download-artifact@v7- # with:- # name: windows-exe-x86-64-result- # path: windows-exe-x86-64-result- #- # - name: Copy exe file to root- # run: cp windows-exe-x86-64-result/*.exe result.exe- #- # - name: Upload Release Asset- # uses: actions/upload-release-asset@v1- # env:- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- # with:- # upload_url: ${{ steps.draft_release.outputs.upload_url }}- # asset_path: result.exe- # asset_name: LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe- # asset_content_type: application/vnd.microsoft.portable-executable+ # WINDOWS EXE (x86_64)+ - name: Download windows exe file+ uses: actions/download-artifact@v7+ with:+ name: windows-exe-x86-64-result+ path: windows-exe-x86-64-result++ - name: Copy exe file to root+ run: cp windows-exe-x86-64-result/*.exe result.exe++ - name: Upload Release Asset+ uses: actions/upload-release-asset@v1+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ with:+ upload_url: ${{ steps.draft_release.outputs.upload_url }}+ asset_path: result.exe+ asset_name: LocalSend-${{ needs.build.outputs.version }}-windows-x86-64.exe+ asset_content_type: application/vnd.microsoft.portable-executable# LINUX CLI (x86_64)- name: Download linux CLI file@@ -1037,7 +1039,7 @@ jobs:asset_name: LocalSend-CLI-${{ needs.build.outputs.version }}-linux-arm-64.tar.gzasset_content_type: application/gzip- # WINDOWS CLI EXE (x86_64, signed via SignPath)+ # WINDOWS CLI EXE (x86_64)- name: Download windows CLI exe fileuses: actions/download-artifact@v7with:@@ -1057,7 +1059,7 @@ jobs:asset_name: LocalSend-CLI-${{ needs.build.outputs.version }}-windows-x86-64.exeasset_content_type: application/vnd.microsoft.portable-executable- # WINDOWS CLI EXE (arm_64, signed via SignPath)+ # WINDOWS CLI EXE (arm_64)- name: Download windows CLI exe fileuses: actions/download-artifact@v7with:diff --git a/app/windows/localsend_app.exe.manifest b/app/windows/localsend_app.exe.manifestindex 725449e9..1eaecc51 100644--- a/app/windows/localsend_app.exe.manifest+++ b/app/windows/localsend_app.exe.manifest@@ -2,7 +2,7 @@<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1"><assemblyIdentity version="0.0.0.0" name="localsendapp" /><msix xmlns="urn:schemas-microsoft-com:msix.v1"- publisher="CN=SignPath Foundation, O=SignPath Foundation, C=US, S=DE, L=Lewes"+ publisher="CN=Tien Do Nam, O=Tien Do Nam, L=Berlin, C=DE"packageName="LocalSend.App"applicationId="localsendapp"/>diff --git a/cli/build.rs b/cli/build.rsindex ad431294..df70d9df 100644--- a/cli/build.rs+++ b/cli/build.rs@@ -1,6 +1,6 @@fn main() {// VERSIONINFO metadata for the Windows exe, mirroring app/windows/runner/Runner.rc.- // SignPath requires ProductName/ProductVersion on all signed binaries.+ // Code signing expects ProductName/ProductVersion on all signed binaries.if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {let mut res = winresource::WindowsResource::new();res.set("ProductName", "LocalSend");diff --git a/support/build/msix/content/AppxManifest.xml b/support/build/msix/content/AppxManifest.xmlindex 50fb6121..256b9ffa 100644--- a/support/build/msix/content/AppxManifest.xml+++ b/support/build/msix/content/AppxManifest.xml@@ -22,7 +22,7 @@xmlns:com3="http://schemas.microsoft.com/appx/manifest/com/windows10/3"IgnorableNamespaces="uap3 desktop"><Identity Name="LocalSend.App" Version="1.18.2.0"- Publisher="CN=SignPath Foundation, O=SignPath Foundation, C=US, S=DE, L=Lewes" ProcessorArchitecture="x64" />+ Publisher="CN=Tien Do Nam, O=Tien Do Nam, L=Berlin, C=DE" ProcessorArchitecture="x64" /><Properties><DisplayName>LocalSend MSIX Helper</DisplayName><PublisherDisplayName>Tien Do Nam</PublisherDisplayName>diff --git a/support/scripts/compile_windows_exe-inno.iss b/support/scripts/compile_windows_exe-inno.issindex 4bacba35..0a78c7a3 100644--- a/support/scripts/compile_windows_exe-inno.iss+++ b/support/scripts/compile_windows_exe-inno.iss@@ -41,7 +41,7 @@ UninstallDisplayIcon={app}\{#MyAppExeName}Compression=lzmaSolidCompression=yesWizardStyle=modern-; CI passes /DSkipSignTool and signs the resulting installer afterwards (SignPath)+; CI passes /DSkipSignTool and signs the resulting installer afterwards#ifndef SkipSignToolSignTool=MySignTool#endif