Skip to content

Commit

Permalink
Package for production
Browse files Browse the repository at this point in the history
  • Loading branch information
orj committed Feb 3, 2020
1 parent 9030fe0 commit 253ddee
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3163,6 +3163,7 @@ function installCertIntoTemporaryKeychain(keychain, setupKeychain, keychainPassw
}
yield unlockKeychain(tempKeychain, keychainPassword, options);
yield importPkcs12(tempKeychain, p12FilePath, p12Password, options);
yield setPartitionList(tempKeychain, keychainPassword);
yield updateKeychainList(tempKeychain, options);
core.setOutput('security-response', output);
});
Expand Down Expand Up @@ -3220,12 +3221,35 @@ function importPkcs12(keychain, p12FilePath, p12Password, options) {
// This would be insecure if the keychain was retained but GitHub action
// VMs are thrown away after use.
'-A',
'-T',
'/usr/bin/codesign',
'-T',
'/usr/bin/security',
'-P',
p12Password
];
yield exec.exec('security', importArgs, options);
});
}
/**
* Sets the partition list for the specified keychain.
* @param keychain The keychain to update.
* @param password The keychain password.
* @param options Execution options (optional)
*/
function setPartitionList(keychain, password, options) {
return __awaiter(this, void 0, void 0, function* () {
const args = [
'set-key-partition-list',
'-S',
'apple-tool:,apple:',
'-k',
password,
keychain
];
yield exec.exec('security', args, options);
});
}
/**
* Unlock the specified Keychain
* @param keychain The keychain to unlock
Expand Down

0 comments on commit 253ddee

Please sign in to comment.