signpath.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. name: MSBuild
  2. on:
  3. push:
  4. branches:
  5. - signpath
  6. paths-ignore:
  7. - '**/README.md'
  8. env:
  9. SOLUTION_FILE_PATH: CP_Main_10.sln
  10. jobs:
  11. build:
  12. runs-on: windows-latest
  13. steps:
  14. - uses: actions/checkout@v4
  15. - name: Set the value
  16. run: |
  17. echo "VERSION_FILENAME=3_25_100_0" | Out-File -FilePath $env:GITHUB_ENV -Append
  18. echo "VERSION_DOT_FILENAME=3.25.100.0" | Out-File -FilePath $env:GITHUB_ENV -Append
  19. - name: Add MSBuild to PATH
  20. uses: microsoft/setup-msbuild@v2
  21. - name: Restore NuGet packages
  22. working-directory: ${{env.GITHUB_WORKSPACE}}
  23. run: nuget restore ${{env.SOLUTION_FILE_PATH}}
  24. - name: Build 64bit
  25. run: msbuild CP_Main_10.sln /p:Configuration=Release /p:Platform=x64
  26. - name: Set Versions
  27. run: |
  28. DittoSetup\rcedit-x64 Release64\Ditto.exe --set-file-version ${{env.VERSION_DOT_FILENAME}} --set-product-version ${{env.VERSION_DOT_FILENAME}}
  29. - name: upload-unsigned-exe
  30. id: upload-unsigned-exe
  31. uses: actions/upload-artifact@v4
  32. with:
  33. name: unsigned-exe
  34. path: |
  35. Release64\Ditto.exe
  36. Release64\ICU_Loader.dll
  37. - id: sign-exe
  38. uses: signpath/[email protected]
  39. with:
  40. api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
  41. organization-id: 'fcf33ea4-4343-46b3-be50-f8fe64e1a900'
  42. project-slug: 'Ditto'
  43. artifact-configuration-slug: 'exe'
  44. signing-policy-slug: 'test-signing'
  45. github-artifact-id: '${{ steps.upload-unsigned-exe.outputs.artifact-id }}'
  46. wait-for-completion: true
  47. output-artifact-directory: '/Release64'
  48. - name: 64bit installer
  49. uses: Minionguyjpro/[email protected]
  50. with:
  51. path: DittoSetup\DittoSetup_10.iss
  52. options: /F"DittoSetup_${{env.VERSION_FILENAME}}" "/dbit64=1"
  53. - name: upload-unsigned-artifact
  54. id: upload-unsigned-artifact
  55. uses: actions/upload-artifact@v4
  56. with:
  57. name: unsigned-intaller
  58. path: DittoSetup\output\DittoSetup_${{env.VERSION_FILENAME}}.exe
  59. - id: optional_step_id
  60. uses: signpath/[email protected]
  61. with:
  62. api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
  63. organization-id: 'fcf33ea4-4343-46b3-be50-f8fe64e1a900'
  64. project-slug: 'Ditto'
  65. artifact-configuration-slug: 'Installer'
  66. signing-policy-slug: 'test-signing'
  67. github-artifact-id: '${{ steps.upload-unsigned-artifact.outputs.artifact-id }}'
  68. wait-for-completion: true
  69. output-artifact-directory: '/DittoSetup/outputSigned'
  70. - name: upload-signed-artifact
  71. id: upload-signed-artifact
  72. uses: actions/upload-artifact@v4
  73. with:
  74. name: signed-intaller
  75. path: DittoSetup\outputSigned\DittoSetup_${{env.VERSION_FILENAME}}.exe