2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

GitHub Actions Release script; (#5384)

* chore(ci): Add release-it script;

* chore(ci): add github actions release script;
This commit is contained in:
Dmitriy Mozgovoy
2022-12-17 22:32:07 +02:00
committed by GitHub
parent 493e04cd28
commit 45b29dbc32
3 changed files with 58 additions and 26 deletions
+2 -24
View File
@@ -2,9 +2,8 @@ import fs from 'fs';
import assert from 'assert';
import axios from '../index.js';
import axiosBuild from '../dist/node/axios.cjs';
import inquirer from 'inquirer';
const {version, name} = JSON.parse(fs.readFileSync('./package.json'));
const {version} = JSON.parse(fs.readFileSync('./package.json'));
console.log('Checking versions...\n----------------------------')
@@ -16,27 +15,6 @@ console.log(`----------------------------`);
assert.strictEqual(version, axios.VERSION, `Version mismatch between package and Axios`);
assert.strictEqual(version, axiosBuild.VERSION, `Version mismatch between package and build`);
console.log('PASSED\n');
const choices = [
`Yes, let's release Axios v${version} to npm`,
`No, don't do an npm release - I'll do it myself`
];
inquirer
.prompt([
{
type: 'list',
name: 'release',
message: `You have requested an npm release for ${name.toUpperCase()} v${version}. Are you sure?`,
choices
}
])
.then((answers) => {
if (choices.indexOf(answers.release)) {
console.warn('terminate...');
process.exit(1);
}
});
console.log('✔️ PASSED\n');