1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-22 11:13:49 +00:00

github action android build steps

This commit is contained in:
Kyle Spearrin
2020-06-08 12:14:10 -04:00
parent c30239b3a8
commit 0a3a982cb9
12 changed files with 262 additions and 5 deletions

29
.github/scripts/decrypt-secret.ps1 vendored Normal file
View File

@@ -0,0 +1,29 @@
param (
[Parameter(Mandatory=$true)]
[string] $filename,
[string] $output
)
$homePath = $env:HOME
$rootPath = $env:GITHUB_WORKSPACE
$secretInputPath = $rootPath + "/.github/secrets"
$input = $secretInputPath + $filename
$passphrase = $env:DECRYPT_FILE_PASSWORD
if ([string]::IsNullOrEmpty($output)) {
$secretOutputPath = $homePath + "/secrets/"
if($filename.EndsWith(".gpg")) {
$output = $secretOutputPath + $filename.TrimEnd(".gpg")
} else {
$output = $secretOutputPath + $filename + ".plaintext"
}
}
if(!(Test-Path -Path $secretPath))
{
New-Item -ItemType Directory -Path $secretPath
}
gpg --quiet --batch --yes --decrypt --passphrase="$passphrase" --output $output $input