From 4fbae2d5bd32f07a1855a4895ef5d22aff15b7d5 Mon Sep 17 00:00:00 2001 From: Mark Sinclair Date: Wed, 23 Mar 2022 15:12:07 +0000 Subject: [PATCH] Create GitHub Action to publish and sign Windows wallet --- .../nym-wallet-publish-windows10.yml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/nym-wallet-publish-windows10.yml diff --git a/.github/workflows/nym-wallet-publish-windows10.yml b/.github/workflows/nym-wallet-publish-windows10.yml new file mode 100644 index 0000000000..2bf49ccb16 --- /dev/null +++ b/.github/workflows/nym-wallet-publish-windows10.yml @@ -0,0 +1,50 @@ +name: Publish Nym Wallet (Windows 10) +on: + release: + types: [created] + +defaults: + run: + working-directory: nym-wallet + +jobs: + publish-tauri: + strategy: + fail-fast: false + matrix: + platform: [windows10] + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v2 + +# - name: Check the release tag starts with `nym-wallet-` +# if: startsWith(github.ref, 'refs/tags/nym-wallet-') == false +# uses: actions/github-script@v3 +# with: +# script: | +# core.setFailed('Release tag did not start with nym-wallet-...') + + - name: Import signing certificate + env: + WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} + WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + run: | + New-Item -ItemType directory -Path certificate + Set-Content -Path certificate/tempCert.txt -Value $env:WINDOWS_CERTIFICATE + certutil -decode certificate/tempCert.txt certificate/certificate.pfx + Remove-Item -path certificate -include tempCert.txt + Import-PfxCertificate -FilePath certificate/certificate.pfx -CertStoreLocation Cert:\CurrentUser\My -Password (ConvertTo-SecureString -String $env:WINDOWS_CERTIFICATE_PASSWORD -Force -AsPlainText) + + - name: Install app dependencies and build it + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ENABLE_CODE_SIGNING: ${{ secrets.WINDOWS_CERTIFICATE }} + WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }} + WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + run: yarn && yarn build + + - name: Upload to release based on tag name + uses: softprops/action-gh-release@v1 + with: + files: nym-wallet/target/release/bundle/msi/*.msi