mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-09 20:36:25 +00:00
Migrate to v5
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user