appveyor.yml.rem 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. image: Visual Studio 2022
  2. version: 3.24.{build}.0
  3. clone_folder: c:\projects\ditto
  4. branches:
  5. only:
  6. - master
  7. - appveyor
  8. skip_branch_with_pr: true
  9. install:
  10. - set INNO_SETUP_PATH=C:\Program Files (x86)\Inno Setup 6
  11. - set APP_CERT_KIT_PATH=C:\Program Files (x86)\Windows Kits\10\App Certification Kit
  12. - set Path=%INNO_SETUP_PATH%;%APP_CERT_KIT_PATH%;%PATH%
  13. environment:
  14. VERSION_FILENAME: 3_24_%APPVEYOR_BUILD_NUMBER%_0
  15. VERSION_DOT_FILENAME: 3.24.%APPVEYOR_BUILD_NUMBER%.0
  16. CHOCO_API_KEY:
  17. secure: ZeAW38gXYNcJmxTOEGhA1RC5XzmJVvxVM8bsCCARnbYHEDmtQiRZxV4G+/KY4wW9
  18. GITHUB_API_KEY:
  19. secure: xDmRXGs7zIdLE5NoI6UZQMLUpbK55imdrQKy594A1WHS8ig0pk0DblQr+70/2rrh
  20. # APPVEYOR_RDP_PASSWORD: Letmein1!
  21. #init:
  22. # - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
  23. build_script:
  24. - echo Building version:%appveyor_build_version%
  25. - cmd: nuget restore
  26. - appveyor AddMessage -Category Information "Building 32bit"
  27. - cmd: msbuild CP_Main_10.sln /p:Configuration=Release /p:Platform=Win32
  28. - appveyor AddMessage -Category Information "Building 64bit"
  29. - cmd: msbuild CP_Main_10.sln /p:Configuration=Release /p:Platform=x64
  30. after_build:
  31. - appveyor AddMessage -Category Information "Setting version"
  32. - DittoSetup\rcedit-x86 Release\Ditto.exe --set-file-version %APPVEYOR_BUILD_VERSION% --set-product-version %APPVEYOR_BUILD_VERSION%
  33. - DittoSetup\rcedit-x64 Release64\Ditto.exe --set-file-version %APPVEYOR_BUILD_VERSION% --set-product-version %APPVEYOR_BUILD_VERSION%
  34. - appveyor AddMessage -Category Information "Building Installers"
  35. - iscc /Q /F"DittoSetup_%VERSION_FILENAME%" "DittoSetup\DittoSetup_10.iss"
  36. - iscc /Q /F"DittoSetup_64bit_%VERSION_FILENAME%" "DittoSetup\DittoSetup_10.iss" "/dbit64=1"
  37. - appveyor AddMessage -Category Information "Building Portables"
  38. - DittoSetup\BuildPortableZIP.bat "DittoPortable_%VERSION_FILENAME%" bit32
  39. - DittoSetup\BuildPortableZIP.bat "DittoPortable_64bit_%VERSION_FILENAME%" bit64
  40. - appveyor AddMessage -Category Information "Zipping Debug files"
  41. - 7z a DittoSetup\output\DittoDebug_%VERSION_FILENAME%.7z *.pdb -r
  42. - 7z a DittoSetup\output\DittoDebug_%VERSION_FILENAME%.7z *.map -r
  43. - appveyor AddMessage -Category Information "Building ditto choco"
  44. - ps: (Get-Content 'DittoSetup\Chocolatey\ditto.nuspec' -Raw).Replace("%version%", "$($env:APPVEYOR_BUILD_VERSION)") | Out-File 'DittoSetup\Chocolatey\ditto.nuspec'
  45. - copy DittoSetup\output\DittoSetup_%VERSION_FILENAME%.exe DittoSetup\Chocolatey\tools\DittoSetup_%VERSION_FILENAME%.exe
  46. - copy DittoSetup\output\DittoSetup_64bit_%VERSION_FILENAME%.exe DittoSetup\Chocolatey\tools\DittoSetup_64bit_%VERSION_FILENAME%.exe
  47. - cd DittoSetup\Chocolatey
  48. - choco pack
  49. - choco push --key %CHOCO_API_KEY% --source https://push.chocolatey.org/
  50. - cd ..
  51. - cd ..
  52. - appveyor AddMessage -Category Information "Building ditto choco.install"
  53. - ps: (Get-Content 'DittoSetup\Chocolatey.install\ditto.nuspec' -Raw).Replace("%version%", "$($env:APPVEYOR_BUILD_VERSION)") | Out-File 'DittoSetup\Chocolatey.install\ditto.nuspec'
  54. - copy DittoSetup\output\DittoSetup_%VERSION_FILENAME%.exe DittoSetup\Chocolatey.install\tools\DittoSetup_%VERSION_FILENAME%.exe
  55. - copy DittoSetup\output\DittoSetup_64bit_%VERSION_FILENAME%.exe DittoSetup\Chocolatey.install\tools\DittoSetup_64bit_%VERSION_FILENAME%.exe
  56. - cd DittoSetup\Chocolatey.install
  57. - choco pack
  58. - choco push --key %CHOCO_API_KEY% --source https://push.chocolatey.org/
  59. - cd ..
  60. - cd ..
  61. - appveyor AddMessage -Category Information "Building ditto choco.portable"
  62. - ps: (Get-Content 'DittoSetup\Chocolatey.portable\ditto.nuspec' -Raw).Replace("%version%", "$($env:APPVEYOR_BUILD_VERSION)") | Out-File 'DittoSetup\Chocolatey.portable\ditto.nuspec'
  63. - copy DittoSetup\output\DittoPortable_%VERSION_FILENAME%.zip DittoSetup\Chocolatey.portable\tools\DittoPortable_%VERSION_FILENAME%.zip
  64. - copy DittoSetup\output\DittoPortable_64bit_%VERSION_FILENAME%.zip DittoSetup\Chocolatey.portable\tools\DittoPortable_64bit_%VERSION_FILENAME%.zip
  65. - cd DittoSetup\Chocolatey.portable
  66. - choco pack
  67. - choco push --key %CHOCO_API_KEY% --source https://push.chocolatey.org/
  68. - cd ..
  69. - cd ..
  70. - appveyor AddMessage -Category Information "Building appx"
  71. - 7z x DittoSetup\output\DittoPortable_%VERSION_FILENAME%.zip -oDittoSetup\appx -r
  72. - ps: (Get-Content 'DittoSetup\appx\appxmanifest.xml' -Raw).Replace("%version%", "$($env:APPVEYOR_BUILD_VERSION)") | Out-File 'DittoSetup\appx\appxmanifest.xml'
  73. - cd DittoSetup\appx
  74. - makeappx.exe pack /f files.ini /p Ditto_%VERSION_FILENAME%.appx
  75. - signtool.exe sign -f my.pfx -fd SHA256 -v Ditto_%VERSION_FILENAME%.appx
  76. - cd ..
  77. - cd ..
  78. - copy DittoSetup\appx\Ditto_%VERSION_FILENAME%.appx DittoSetup\Output\Ditto_%VERSION_FILENAME%.appx
  79. - appveyor AddMessage -Category Information "Publishing to GitHub"
  80. - npm install ./DittoSetup/GitHubRelease && SET "token=%GITHUB_API_KEY%" && SET "uploadPath=DittoSetup\output\" && SET "tag=%APPVEYOR_BUILD_VERSION%" && SET "previous_tag=3.24.246.0" && node ./DittoSetup/GitHubRelease/index.js
  81. artifacts:
  82. - path: DittoSetup\output\DittoSetup_%VERSION_FILENAME%.exe
  83. name: Ditto Setup
  84. - path: DittoSetup\output\DittoSetup_64bit_%VERSION_FILENAME%.exe
  85. name: Ditto Setup 64bit
  86. - path: DittoSetup\output\DittoPortable_%VERSION_FILENAME%.zip
  87. name: Ditto Portable
  88. - path: DittoSetup\output\DittoPortable_64bit_%VERSION_FILENAME%.zip
  89. name: Ditto Portable 64bit
  90. - path: DittoSetup\output\DittoDebug_%VERSION_FILENAME%.7z
  91. name: Ditto Debug
  92. - path: DittoSetup\output\Ditto_%VERSION_FILENAME%.appx
  93. name: Ditto appx
  94. - path: DittoSetup\Chocolatey\ditto.%VERSION_DOT_FILENAME%-beta.nupkg
  95. name: Ditto Choco
  96. #deploy:
  97. #- provider: Webhook
  98. # url: https://app.signpath.io/API/v1/11add37b-5875-49ff-a233-919a1833b6d8/Integrations/AppVeyor?ProjectSlug=Ditto&SigningPolicySlug=release-signing&ArtifactConfigurationSlug=initial
  99. # authorization:
  100. # secure: /YrIyb25bbTkbgBsg/1ttvD6y9GC4BqSNqSewTSIVMmYYrmyWw1VaJ7a80ixX6uXVYQ38UAn/qniQnWpDDNYbw==