init auto release project
This commit is contained in:
parent
474ea7e326
commit
a4fb114746
@ -13,6 +13,9 @@ inputs:
|
|||||||
initial-version:
|
initial-version:
|
||||||
description: "Initial version to start from"
|
description: "Initial version to start from"
|
||||||
default: "v0.0.0"
|
default: "v0.0.0"
|
||||||
|
target-commitish:
|
||||||
|
description: "Commitish value that determines where the Git tag is created from"
|
||||||
|
default: "main"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: node20
|
using: node20
|
||||||
|
10
release/dist/index.js
vendored
10
release/dist/index.js
vendored
@ -33252,6 +33252,7 @@ async function run() {
|
|||||||
const host = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("host");
|
const host = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("host");
|
||||||
const token = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("token");
|
const token = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("token");
|
||||||
const repository = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("repository");
|
const repository = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("repository");
|
||||||
|
const target_commitish = _actions_core__WEBPACK_IMPORTED_MODULE_0__.getInput("target-commitish");
|
||||||
|
|
||||||
const [owner, repo] = repository.split("/");
|
const [owner, repo] = repository.split("/");
|
||||||
|
|
||||||
@ -33268,7 +33269,12 @@ async function run() {
|
|||||||
|
|
||||||
let newVersion = getNewestRelease(releases);
|
let newVersion = getNewestRelease(releases);
|
||||||
|
|
||||||
console.log(`NEW RELEASE ${newVersion}`);
|
let response = await client.repository.repoCreateRelease({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag_name: newVersion,
|
||||||
|
target_commitish,
|
||||||
|
});
|
||||||
// console.log(`🎉 Release ready at ${response.html_url}`);
|
// console.log(`🎉 Release ready at ${response.html_url}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@ -33301,11 +33307,9 @@ function getNewestRelease(releases) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let version = semVerParser(initialVersion);
|
let version = semVerParser(initialVersion);
|
||||||
console.log(`Initial version ${version}`);
|
|
||||||
|
|
||||||
for (let release of releases) {
|
for (let release of releases) {
|
||||||
let releaseVersion = semVerParser(release.tag_name);
|
let releaseVersion = semVerParser(release.tag_name);
|
||||||
console.log(`Initial releaseVersion ${releaseVersion}`);
|
|
||||||
|
|
||||||
if (isSemVerGreater(releaseVersion, version)) {
|
if (isSemVerGreater(releaseVersion, version)) {
|
||||||
version = releaseVersion;
|
version = releaseVersion;
|
||||||
|
@ -7,6 +7,7 @@ async function run() {
|
|||||||
const host = core.getInput("host");
|
const host = core.getInput("host");
|
||||||
const token = core.getInput("token");
|
const token = core.getInput("token");
|
||||||
const repository = core.getInput("repository");
|
const repository = core.getInput("repository");
|
||||||
|
const target_commitish = core.getInput("target-commitish");
|
||||||
|
|
||||||
const [owner, repo] = repository.split("/");
|
const [owner, repo] = repository.split("/");
|
||||||
|
|
||||||
@ -23,7 +24,12 @@ async function run() {
|
|||||||
|
|
||||||
let newVersion = getNewestRelease(releases);
|
let newVersion = getNewestRelease(releases);
|
||||||
|
|
||||||
console.log(`NEW RELEASE ${newVersion}`);
|
let response = await client.repository.repoCreateRelease({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag_name: newVersion,
|
||||||
|
target_commitish,
|
||||||
|
});
|
||||||
// console.log(`🎉 Release ready at ${response.html_url}`);
|
// console.log(`🎉 Release ready at ${response.html_url}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
@ -56,11 +62,9 @@ function getNewestRelease(releases) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let version = semVerParser(initialVersion);
|
let version = semVerParser(initialVersion);
|
||||||
console.log(`Initial version ${version}`);
|
|
||||||
|
|
||||||
for (let release of releases) {
|
for (let release of releases) {
|
||||||
let releaseVersion = semVerParser(release.tag_name);
|
let releaseVersion = semVerParser(release.tag_name);
|
||||||
console.log(`Initial releaseVersion ${releaseVersion}`);
|
|
||||||
|
|
||||||
if (isSemVerGreater(releaseVersion, version)) {
|
if (isSemVerGreater(releaseVersion, version)) {
|
||||||
version = releaseVersion;
|
version = releaseVersion;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user