mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
try github action ci build
This commit is contained in:
29
.github/scripts/decrypt-secret.ps1
vendored
Normal file
29
.github/scripts/decrypt-secret.ps1
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
param (
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string] $filename,
|
||||
[string] $output
|
||||
)
|
||||
|
||||
$homePath = Resolve-Path "~" | Select-Object -ExpandProperty Path
|
||||
$rootPath = $env:GITHUB_WORKSPACE
|
||||
|
||||
$secretInputPath = $rootPath + "/.github/secrets"
|
||||
$input = $secretInputPath + "/" + $filename
|
||||
|
||||
$passphrase = $env:DECRYPT_FILE_PASSWORD
|
||||
$secretOutputPath = $homePath + "/secrets"
|
||||
|
||||
if ([string]::IsNullOrEmpty($output)) {
|
||||
if ($filename.EndsWith(".gpg")) {
|
||||
$output = $secretOutputPath + "/" + $filename.TrimEnd(".gpg")
|
||||
} else {
|
||||
$output = $secretOutputPath + "/" + $filename + ".plaintext"
|
||||
}
|
||||
}
|
||||
|
||||
if (!(Test-Path -Path $secretOutputPath))
|
||||
{
|
||||
New-Item -ItemType Directory -Path $secretOutputPath
|
||||
}
|
||||
|
||||
gpg --quiet --batch --yes --decrypt --passphrase="$passphrase" --output $output $input
|
||||
10
.github/scripts/macos/decrypt-secrets.ps1
vendored
Normal file
10
.github/scripts/macos/decrypt-secrets.ps1
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
$rootPath = $env:GITHUB_WORKSPACE;
|
||||
|
||||
$decryptSecretPath = $($rootPath + "/.github/scripts/decrypt-secret.ps1");
|
||||
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename bitwarden-deskop-key.p12.gpg"
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename appstore-app-cert.p12.gpg"
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename appstore-installer-cert.p12.gpg"
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename devid-app-cert.p12.gpg"
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename devid-installer-cert.p12.gpg"
|
||||
Invoke-Expression "& `"$decryptSecretPath`" -filename bitwarden_desktop_appstore.provisionprofile.gpg"
|
||||
2
.github/scripts/macos/increment-version.ps1
vendored
Normal file
2
.github/scripts/macos/increment-version.ps1
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
$rootPath = $env:GITHUB_WORKSPACE;
|
||||
$buildNumber = 100 + [int]$env:GITHUB_RUN_NUMBER;
|
||||
19
.github/scripts/macos/setup-keychain.ps1
vendored
Normal file
19
.github/scripts/macos/setup-keychain.ps1
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
$homePath = Resolve-Path "~" | Select-Object -ExpandProperty Path;
|
||||
$secretsPath = $homePath + "/secrets"
|
||||
|
||||
$desktopKeyPath = $($secretsPath + "/bitwarden-dekstop-key.p12");
|
||||
$devidAppCertPath = $($secretsPath + "/devid-app-cert.p12");
|
||||
$devidInstallerCertPath = $($secretsPath + "/devid-installer-cert.p12");
|
||||
$appstoreAppCertPath = $($secretsPath + "/appstore-app-cert.p12");
|
||||
$appstoreInstallerCertPath = $($secretsPath + "/appstore-installer-cert.p12");
|
||||
|
||||
security create-keychain -p $env:KEYCHAIN_PASSWORD build.keychain
|
||||
security default-keychain -s build.keychain
|
||||
security unlock-keychain -p $env:KEYCHAIN_PASSWORD build.keychain
|
||||
security set-keychain-settings -lut 1200 build.keychain
|
||||
security import $desktopKeyPath -k build.keychain -P $env:DESKTOP_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
|
||||
security import $devidAppCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
|
||||
security import $devidInstallerCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
|
||||
security import $appstoreAppCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
|
||||
security import $appstoreInstallerCertPath -k build.keychain -P $env:DIST_CERT_PASSWORD -T /usr/bin/codesign -T /usr/bin/security
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $env:KEYCHAIN_PASSWORD build.keychain
|
||||
6
.github/scripts/macos/setup-profiles.ps1
vendored
Normal file
6
.github/scripts/macos/setup-profiles.ps1
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
$homePath = Resolve-Path "~" | Select-Object -ExpandProperty Path;
|
||||
$secretsPath = $homePath + "/secrets"
|
||||
$rootPath = $env:GITHUB_WORKSPACE
|
||||
$pprofile = "bitwarden_desktop_appstore.provisionprofile"
|
||||
|
||||
Copy-Item "$secretsPath/$pprofile" -destination "$rootPath/$pprofile"
|
||||
Reference in New Issue
Block a user