mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-15 23:41:45 +00:00
Migrate to v5
This commit is contained in:
parent
16bc085eaf
commit
51773137e8
1 changed files with 5 additions and 5 deletions
|
|
@ -31,14 +31,14 @@ const verify = async (filename: string) => {
|
||||||
|
|
||||||
// Verify shasum
|
// Verify shasum
|
||||||
const verified = await openpgp.verify({
|
const verified = await openpgp.verify({
|
||||||
message: await openpgp.cleartext.fromText(shasum),
|
message: await openpgp.createMessage({ text: shasum }),
|
||||||
signature: await openpgp.signature.readArmored(shaSig),
|
signature: await openpgp.readSignature({ armoredSignature: shaSig }),
|
||||||
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys,
|
verificationKeys: await openpgp.readKeys({ armoredKeys: publicKeyArmored }),
|
||||||
});
|
});
|
||||||
const {valid} = verified.signatures[0];
|
const valid = await verified.signatures[0].verified;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
core.info('==> SHASUM file signed by key id ' +
|
core.info('==> SHASUM file signed by key id ' +
|
||||||
verified.signatures[0].keyid.toHex(),
|
verified.signatures[0].keyID.toHex(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setFailure('Codecov: Error validating SHASUM signature', true);
|
setFailure('Codecov: Error validating SHASUM signature', true);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue