Skip to content

Commit e7c7237

Browse files
feat: build for release
1 parent 15cf138 commit e7c7237

File tree

5 files changed

+153
-119
lines changed

5 files changed

+153
-119
lines changed

build.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"owner":"technote-space","repo":"release-github-actions","sha":"e97a018f5fc70da8119fc85f55f83283d1178dd8","ref":"refs/tags/test/v7.2.4.2261715824","tagName":"test/v7.2.4.2261715824","branch":"gh-actions","tags":["test/v7.2.4.2261715824","test/v7.2.4","test/v7.2","test/v7"],"updated_at":"2022-05-03T03:30:25.456Z"}
1+
{"owner":"technote-space","repo":"release-github-actions","sha":"7f8e6fbffa14ced636534dbe6e65baa30355d43c","ref":"refs/tags/test/v7.2.4.2285084886","tagName":"test/v7.2.4.2285084886","branch":"gh-actions","tags":["test/v7.2.4.2285084886","test/v7.2.4","test/v7.2","test/v7"],"updated_at":"2022-05-07T03:17:38.582Z"}

lib/index.cjs

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,13 @@ function requireOidcUtils () {
12661266
return oidcUtils;
12671267
}
12681268

1269-
var markdownSummary = {};
1269+
var summary = {};
12701270

1271-
var hasRequiredMarkdownSummary;
1271+
var hasRequiredSummary;
12721272

1273-
function requireMarkdownSummary () {
1274-
if (hasRequiredMarkdownSummary) return markdownSummary;
1275-
hasRequiredMarkdownSummary = 1;
1273+
function requireSummary () {
1274+
if (hasRequiredSummary) return summary;
1275+
hasRequiredSummary = 1;
12761276
(function (exports) {
12771277
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
12781278
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -1284,13 +1284,13 @@ function requireMarkdownSummary () {
12841284
});
12851285
};
12861286
Object.defineProperty(exports, "__esModule", { value: true });
1287-
exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
1287+
exports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;
12881288
const os_1 = require$$0__default["default"];
12891289
const fs_1 = fs__default["default"];
12901290
const { access, appendFile, writeFile } = fs_1.promises;
12911291
exports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';
1292-
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-markdown-summary';
1293-
class MarkdownSummary {
1292+
exports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';
1293+
class Summary {
12941294
constructor() {
12951295
this._buffer = '';
12961296
}
@@ -1307,7 +1307,7 @@ function requireMarkdownSummary () {
13071307
}
13081308
const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];
13091309
if (!pathFromEnv) {
1310-
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports markdown summaries.`);
1310+
throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);
13111311
}
13121312
try {
13131313
yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);
@@ -1342,7 +1342,7 @@ function requireMarkdownSummary () {
13421342
*
13431343
* @param {SummaryWriteOptions} [options] (optional) options for write operation
13441344
*
1345-
* @returns {Promise<MarkdownSummary>} markdown summary instance
1345+
* @returns {Promise<Summary>} summary instance
13461346
*/
13471347
write(options) {
13481348
return __awaiter(this, void 0, void 0, function* () {
@@ -1356,7 +1356,7 @@ function requireMarkdownSummary () {
13561356
/**
13571357
* Clears the summary buffer and wipes the summary file
13581358
*
1359-
* @returns {MarkdownSummary} markdown summary instance
1359+
* @returns {Summary} summary instance
13601360
*/
13611361
clear() {
13621362
return __awaiter(this, void 0, void 0, function* () {
@@ -1382,7 +1382,7 @@ function requireMarkdownSummary () {
13821382
/**
13831383
* Resets the summary buffer without writing to summary file
13841384
*
1385-
* @returns {MarkdownSummary} markdown summary instance
1385+
* @returns {Summary} summary instance
13861386
*/
13871387
emptyBuffer() {
13881388
this._buffer = '';
@@ -1394,7 +1394,7 @@ function requireMarkdownSummary () {
13941394
* @param {string} text content to add
13951395
* @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)
13961396
*
1397-
* @returns {MarkdownSummary} markdown summary instance
1397+
* @returns {Summary} summary instance
13981398
*/
13991399
addRaw(text, addEOL = false) {
14001400
this._buffer += text;
@@ -1403,7 +1403,7 @@ function requireMarkdownSummary () {
14031403
/**
14041404
* Adds the operating system-specific end-of-line marker to the buffer
14051405
*
1406-
* @returns {MarkdownSummary} markdown summary instance
1406+
* @returns {Summary} summary instance
14071407
*/
14081408
addEOL() {
14091409
return this.addRaw(os_1.EOL);
@@ -1414,7 +1414,7 @@ function requireMarkdownSummary () {
14141414
* @param {string} code content to render within fenced code block
14151415
* @param {string} lang (optional) language to syntax highlight code
14161416
*
1417-
* @returns {MarkdownSummary} markdown summary instance
1417+
* @returns {Summary} summary instance
14181418
*/
14191419
addCodeBlock(code, lang) {
14201420
const attrs = Object.assign({}, (lang && { lang }));
@@ -1427,7 +1427,7 @@ function requireMarkdownSummary () {
14271427
* @param {string[]} items list of items to render
14281428
* @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)
14291429
*
1430-
* @returns {MarkdownSummary} markdown summary instance
1430+
* @returns {Summary} summary instance
14311431
*/
14321432
addList(items, ordered = false) {
14331433
const tag = ordered ? 'ol' : 'ul';
@@ -1440,7 +1440,7 @@ function requireMarkdownSummary () {
14401440
*
14411441
* @param {SummaryTableCell[]} rows table rows
14421442
*
1443-
* @returns {MarkdownSummary} markdown summary instance
1443+
* @returns {Summary} summary instance
14441444
*/
14451445
addTable(rows) {
14461446
const tableBody = rows
@@ -1468,7 +1468,7 @@ function requireMarkdownSummary () {
14681468
* @param {string} label text for the closed state
14691469
* @param {string} content collapsable content
14701470
*
1471-
* @returns {MarkdownSummary} markdown summary instance
1471+
* @returns {Summary} summary instance
14721472
*/
14731473
addDetails(label, content) {
14741474
const element = this.wrap('details', this.wrap('summary', label) + content);
@@ -1481,7 +1481,7 @@ function requireMarkdownSummary () {
14811481
* @param {string} alt text description of the image
14821482
* @param {SummaryImageOptions} options (optional) addition image attributes
14831483
*
1484-
* @returns {MarkdownSummary} markdown summary instance
1484+
* @returns {Summary} summary instance
14851485
*/
14861486
addImage(src, alt, options) {
14871487
const { width, height } = options || {};
@@ -1495,7 +1495,7 @@ function requireMarkdownSummary () {
14951495
* @param {string} text heading text
14961496
* @param {number | string} [level=1] (optional) the heading level, default: 1
14971497
*
1498-
* @returns {MarkdownSummary} markdown summary instance
1498+
* @returns {Summary} summary instance
14991499
*/
15001500
addHeading(text, level) {
15011501
const tag = `h${level}`;
@@ -1508,7 +1508,7 @@ function requireMarkdownSummary () {
15081508
/**
15091509
* Adds an HTML thematic break (<hr>) to the summary buffer
15101510
*
1511-
* @returns {MarkdownSummary} markdown summary instance
1511+
* @returns {Summary} summary instance
15121512
*/
15131513
addSeparator() {
15141514
const element = this.wrap('hr', null);
@@ -1517,7 +1517,7 @@ function requireMarkdownSummary () {
15171517
/**
15181518
* Adds an HTML line break (<br>) to the summary buffer
15191519
*
1520-
* @returns {MarkdownSummary} markdown summary instance
1520+
* @returns {Summary} summary instance
15211521
*/
15221522
addBreak() {
15231523
const element = this.wrap('br', null);
@@ -1529,7 +1529,7 @@ function requireMarkdownSummary () {
15291529
* @param {string} text quote text
15301530
* @param {string} cite (optional) citation url
15311531
*
1532-
* @returns {MarkdownSummary} markdown summary instance
1532+
* @returns {Summary} summary instance
15331533
*/
15341534
addQuote(text, cite) {
15351535
const attrs = Object.assign({}, (cite && { cite }));
@@ -1542,18 +1542,22 @@ function requireMarkdownSummary () {
15421542
* @param {string} text link text/content
15431543
* @param {string} href hyperlink
15441544
*
1545-
* @returns {MarkdownSummary} markdown summary instance
1545+
* @returns {Summary} summary instance
15461546
*/
15471547
addLink(text, href) {
15481548
const element = this.wrap('a', text, { href });
15491549
return this.addRaw(element).addEOL();
15501550
}
15511551
}
1552-
// singleton export
1553-
exports.markdownSummary = new MarkdownSummary();
1552+
const _summary = new Summary();
1553+
/**
1554+
* @deprecated use `core.summary`
1555+
*/
1556+
exports.markdownSummary = _summary;
1557+
exports.summary = _summary;
15541558

1555-
} (markdownSummary));
1556-
return markdownSummary;
1559+
} (summary));
1560+
return summary;
15571561
}
15581562

15591563
var hasRequiredCore;
@@ -1873,10 +1877,15 @@ function requireCore () {
18731877
}
18741878
exports.getIDToken = getIDToken;
18751879
/**
1876-
* Markdown summary exports
1880+
* Summary exports
1881+
*/
1882+
var summary_1 = requireSummary();
1883+
Object.defineProperty(exports, "summary", { enumerable: true, get: function () { return summary_1.summary; } });
1884+
/**
1885+
* @deprecated use core.summary
18771886
*/
1878-
var markdown_summary_1 = requireMarkdownSummary();
1879-
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return markdown_summary_1.markdownSummary; } });
1887+
var summary_2 = requireSummary();
1888+
Object.defineProperty(exports, "markdownSummary", { enumerable: true, get: function () { return summary_2.markdownSummary; } });
18801889

18811890
} (core));
18821891
return core;

0 commit comments

Comments
 (0)