From fb9025a0e4bac4835eb7f4c50086e5995cfca2cb Mon Sep 17 00:00:00 2001 From: Vladimir Borisov Date: Tue, 19 Nov 2024 17:10:42 +0200 Subject: [PATCH] Remove old certificate and replace the automatic build script with manual scripts --- .github/workflows/build.yml | 44 ------------------------------------- build.ps1 | 21 ++++++++++++++++++ upload.ps1 | 3 +++ 3 files changed, 24 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 build.ps1 create mode 100644 upload.ps1 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 3debfb6..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Build Installer - -on: - push: - tags: - - 'v*' - -jobs: - build: - runs-on: windows-latest - steps: - # The Windows runners have autocrlf enabled by default - # which causes failures for some of rustfmt's line-ending sensitive tests - - name: disable git eol translation - run: git config --global core.autocrlf false - - name: checkout - uses: actions/checkout@v3 - - name: Rust stable - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: stable - target: i686-pc-windows-msvc - - name: Build main application - run: cargo build --release --target i686-pc-windows-msvc - - name: Build the setup proggam - run: | - & 'C:\Program Files (x86)\Inno Setup 6\ISCC.exe' /DSIGN '/Sstremiosign=$qC:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe$q sign /f $q${{ github.workspace }}\certificates\smartcode-20211118-20241118.pfx$q /p ${{ secrets.WIN_CERT_PASSWORD }} /v $f' '${{ github.workspace }}\setup\Stremio.iss' - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }} - aws-region: eu-west-1 - - - name: Upload to Amazon S3 - run: | - aws s3 cp --acl public-read ".\StremioSetup-v$((get-item .\StremioSetup*.exe).VersionInfo.ProductVersion.Trim()).exe" s3://stremio-artifacts/stremio-shell-ng/${{ github.ref_name }}/ - - name: Generate RC descriptor - run: | - node ./generate_descriptor.js --wait-all --tag=${{ github.ref_name }} - - uses: actions/upload-artifact@v3 - with: - name: stremio-setup - path: StremioSetup-v*.exe diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..1ef6f6b --- /dev/null +++ b/build.ps1 @@ -0,0 +1,21 @@ +param ( + [String]$pw = $( Read-Host "Password" ) +) + +$thread = Start-ThreadJob -InputObject ($pw) -ScriptBlock { + $wshell = New-Object -ComObject wscript.shell; + $pw = "$($input)~" + while ($true) { + while ( -not $wshell.AppActivate("Windows Security")) { + Start-Sleep 1 + } + Start-Sleep 1 + $wshell.SendKeys($pw, $true) + Start-Sleep 1 + } +} + +cargo build --release --target i686-pc-windows-msvc +& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DSIGN "/Sstremiosign=`$qC:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\signtool.exe`$q sign /t http://timestamp.digicert.com /n `$qSmart Code OOD`$q `$f" "setup\Stremio.iss" + +Stop-Job -Job $thread diff --git a/upload.ps1 b/upload.ps1 new file mode 100644 index 0000000..3c0f842 --- /dev/null +++ b/upload.ps1 @@ -0,0 +1,3 @@ +$tag = $(git describe --abbrev=0) +aws s3 cp --acl public-read ".\StremioSetup-v$((get-item .\StremioSetup*.exe).VersionInfo.ProductVersion.Trim()).exe" s3://stremio-artifacts/stremio-shell-ng/$tag/ +node ./generate_descriptor.js --tag=$tag