Skip to content

Commit

Permalink
Update build-python-packages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jun 10, 2024
1 parent 8c18299 commit 4457c66
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build-python-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ jobs:
with:
script: |
const fs = require('fs');
const assert = require('assert');
const { createHash } = require('node:crypto');
const hashes = fs.readFileSync('./hashes.sha256', { encoding: 'ascii', flag: 'r' }).split('\n');
console.log(hashes)
Expand All @@ -214,6 +215,9 @@ jobs:
const data = fs.readFileSync(artifactPath)
console.log(typeof data)
hash.update(data)
console.log(hash.digest('hex'));
const hash_digest = hash.digest('hex').toUpperCase();
const hash_line = `${hash_digest} ${artifactName}`;
console.log(hash_line);
assert(hashes.includes(hash_line));
}

0 comments on commit 4457c66

Please sign in to comment.