Skip to content

Commit

Permalink
Add cer
Browse files Browse the repository at this point in the history
  • Loading branch information
TaYaKi71751 committed Sep 30, 2024
1 parent d6cacb5 commit 2165b1c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -passin pass:$randomString
flutter build windows
flutter pub run msix:create --certificate-path key.pfx --certificate-password $randomString --install-certificate false
Expand All @@ -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:
Expand Down

0 comments on commit 2165b1c

Please sign in to comment.