diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index e95b10c1..2f656c96 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -70,6 +70,7 @@ jobs: mkdir $dest mv build\windows\runner\Release\* $dest\ mv yubioath-desktop.msi deploy + mv resources deploy - name: Upload artifact uses: actions/upload-artifact@v1 diff --git a/resources/win/release-win.ps1 b/resources/win/release-win.ps1 new file mode 100644 index 00000000..a778cc1a --- /dev/null +++ b/resources/win/release-win.ps1 @@ -0,0 +1,19 @@ +$version=6.0.0-dev.0 + +echo "Renaming the Actions folder and moving it" +mv yubioath-desktop-* release + +echo "Signing the executables" +signtool.exe sign /fd SHA256 /t http://timestamp.digicert.com/scripts/timstamp.dll release/authenticator.exe +signtool.exe sign /fd SHA256 /t http://timestamp.digicert.com/scripts/timstamp.dll release/helper/authenticator-helper.exe + +echo "Setting env var and building installer" +$env:SRCDIR = ".\release\" +heat dir .\release -out fragment.wxs -gg -scom -srd -sfrag -dr INSTALLDIR -cg ApplicationFiles -var env.SRCDIR +candle .\fragment.wxs .\resources\win\yubioath-desktop.wxs -ext WixUtilExtension -arch x64 +light fragment.wixobj yubioath-desktop.wixobj -ext WixUIExtension -ext WixUtilExtension -o yubioath-desktop-$version-win64.msi + +echo "Signing the installer" +signtool.exe sign /d "Yubico Authenticator" /fd SHA256 /t http://timestamp.digicert.com/scripts/timstamp.dll yubioath-desktop-$version-win64.msi + +echo "All done" diff --git a/set-version.py b/set-version.py index a8dc4790..9329c08a 100755 --- a/set-version.py +++ b/set-version.py @@ -131,7 +131,15 @@ def update_helper_version(buf): ) return buf +# release-win.ps1 +def update_release_win(buf): + return sub1( + rf'\$version={version_pattern}', + f'$version={version}', + buf, + ) update_file("pubspec.yaml", update_pubspec) update_file("windows/runner/Runner.rc", update_runner_rc) -update_file("helper/version_info.txt", update_helper_version) \ No newline at end of file +update_file("helper/version_info.txt", update_helper_version) +update_file("resources/win/release-win.ps1", update_release_win) \ No newline at end of file