Release: ensure builds have the proper version

- order hooks in execution order
- update workflow actions

Closes gh-5519
This commit is contained in:
Timmy Willison
2024-07-17 09:32:02 -04:00
committed by GitHub
parent 1fa8df5dbd
commit 3e612aeeb3
5 changed files with 33 additions and 10 deletions

View File

@@ -24,13 +24,14 @@ const REGISTRY_URL = "https://registry.npmjs.org/jquery";
const rstable = /^(\d+\.\d+\.\d+)$/;
export async function verifyRelease( { version } = {} ) {
async function verifyRelease( { version } = {} ) {
if ( !version ) {
version = process.env.VERSION || ( await getLatestVersion() );
}
console.log( `Checking jQuery ${ version }...` );
const release = await buildRelease( { version } );
console.log( `Verifying jQuery ${ version }...` );
let verified = true;
// Only check stable versions against the CDN
@@ -139,8 +140,8 @@ async function buildRelease( { version } ) {
.filter( ( dirent ) => dirent.isFile() )
.map( async( dirent ) => ( {
name: dirent.name,
path: path.basename( dirent.path ),
contents: await readFile( path.join( dirent.path, dirent.name ), "utf8" )
path: path.basename( dirent.parentPath ),
contents: await readFile( path.join( dirent.parentPath, dirent.name ), "utf8" )
} ) )
);
@@ -196,3 +197,5 @@ async function sumTarball( filepath ) {
const unzipped = await gunzip( contents );
return shasum( unzipped );
}
verifyRelease();