mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 17:06:42 +00:00
20 lines
729 B
JavaScript
20 lines
729 B
JavaScript
const { Octokit } = require("@octokit/core");
|
|
|
|
const auth = process.env.GITHUB_TOKEN;
|
|
const tagName = `v${process.env.CURRENT_VERSION}`;
|
|
const owner = 'steedos';
|
|
const repo = 'steedos-project-template';
|
|
const target_commitish = null;
|
|
|
|
const octokit = new Octokit({ auth: auth });
|
|
|
|
octokit.request('POST /repos/{owner}/{repo}/releases', {
|
|
owner: owner,
|
|
repo: repo,
|
|
tag_name: tagName,
|
|
// target_commitish: target_commitish //Default: the repository's default branch (usually master).
|
|
}).then(() => {
|
|
console.info(`success: [${target_commitish}]create ${owner}/${repo} release ${tagName}`)
|
|
}).catch((error) => {
|
|
console.error(`fail: [${target_commitish}]create ${owner}/${repo} release ${tagName}`, error)
|
|
}) |