diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d71c8d6..951644a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,9 +13,15 @@ jobs: uses: subosito/flutter-action@main - name: Build run: | + $length = 128 + $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.ToCharArray() + $randomString = -join ((1..$length) | ForEach-Object { $characters | Get-Random }) + $cert = New-SelfSignedCertificate -Type CodeSigning -Subject "CN=TaYaKi71751" -CertStoreLocation "Cert:\CurrentUser\My" - $password = ConvertTo-SecureString -String "TaYaKi71751" -Force -AsPlainText + $password = ConvertTo-SecureString -String "$randomString" -Force -AsPlainText Export-PfxCertificate -Cert $cert -FilePath "key.pfx" -Password $password + openssl pkcs12 -in key.pfx -clcerts -nokeys -out key.cer -passout pass:$randomString + flutter build windows flutter pub run msix:create --certificate-path key.pfx --certificate-password $randomString --install-certificate false @@ -26,6 +32,7 @@ jobs: path: | build\windows\x64\runner\Release\* key.pfx + key.cer # https://github.com/AppImageCrafters/appimage-builder-flutter-example/blob/main/.github/workflows/appimage.yml linux-build: