async function createFolder() {
    jetpack.remove(path.join(folder, 'glightbox-master.zip'));

    const tmpfolder = path.join(os.tmpdir(), 'glightbox-master');
    const newVersion = args[0];

    await updateFileVersion({
        file: path.join(folder, 'index.html'),
        search: /download\/(.*)\/glightbox/g,
        replace: newVersion
    });

    await updateFileVersion({
        file: path.join(folder, 'package.json'),
        search: /"version":\s?"(.*)",/g,
        replace: newVersion
    });

    await updateFileVersion({
        file: path.join(folder, 'README.md'),
        search: /v([0-9-.]+)/g,
        replace: newVersion
    });

    await updateFileVersion({
        file: path.join(folder, 'src/js/glightbox.js'),
        search: /version\s?=\s?'(.*)';/g,
        replace: newVersion
    });

    jetpack.copy(folder, tmpfolder, {
        matching: [
            '!node_modules',
            '!node_modules/**/*',
            '!.git',
            '!.git/**/*',
            '!.github',
            '!.github/**/*',
            '!.vscode',
            '!.idea',
            '!.idea/**/*',
            '!.nova',
            '!.nova/**/*',
            '!icons.zip',
            '!.vscode/**/*',
            '!*.psd',
            '!.DS_Store'
        ]
    });
    console.log('Created folder', `Created folder correctly`);

    const zip = await createZip(tmpfolder).catch((error) => {
        jetpack.remove(tmpfolder);
    });

    const folderName = path.basename(folder);
    jetpack.remove(tmpfolder);
    jetpack.move(zip, path.join(folder, folderName + '-master.zip'));

    console.log('Done', `Packaging process ended correctly`);
}
Realease new version
calling
node development/package.js versionhere
then npm publish