Skip to content

Commit 0793c99

Browse files
authored
Merge pull request #115 from cloudnode-pro/build-workflow
Update and rename build workflow
2 parents dcdff4d + 2b398bd commit 0793c99

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test
1+
name: Build
22
'on':
33
pull_request:
44
types: [ opened, synchronize, reopened ]
@@ -12,8 +12,8 @@ jobs:
1212
strategy:
1313
matrix:
1414
node:
15+
- 20
1516
- 18
16-
- 16
1717
steps:
1818
- uses: actions/setup-node@v1
1919
with:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm](https://img.shields.io/npm/v/cloudnode-ts)](https://www.npmjs.com/package/cloudnode-ts)
44
![API Version: 5.13.0](https://img.shields.io/badge/API%20Version-5.13.0-%232563eb)
5-
![build: passing](https://img.shields.io/badge/build-passing-%2316a34a)
5+
[![Build](https://github.com/cloudnode-pro/ts-client/actions/workflows/build.yml/badge.svg)](https://github.com/cloudnode-pro/ts-client/actions/workflows/build.yml)
66
[![CodeQL](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql)
77
[![npm downloads](https://img.shields.io/npm/dt/cloudnode-ts?label=downloads)](https://www.npmjs.com/package/cloudnode-ts)
88

README.template.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# {{config.name}} API Client
22

3-
{{{shield.version}}}
3+
[![npm](https://img.shields.io/npm/v/cloudnode-ts)](https://www.npmjs.com/package/cloudnode-ts)
44
{{{shield.apiVersion}}}
5-
{{{shield.build}}}
6-
{{{shield.codeQl}}}
7-
{{{shield.downloads}}}
5+
[![Build](https://github.com/cloudnode-pro/ts-client/actions/workflows/build.yml/badge.svg)](https://github.com/cloudnode-pro/ts-client/actions/workflows/build.yml)
6+
[![CodeQL](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql)
7+
[![npm downloads](https://img.shields.io/npm/dt/cloudnode-ts?label=downloads)](https://www.npmjs.com/package/cloudnode-ts)
88

99
{{pkg.description}}
1010

gen/docs.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import DocSchema from "./DocSchema.js";
55
import fs from "node:fs/promises";
66
import Package from "./Package";
77
import Mustache from "mustache";
8-
import * as child_process from "child_process";
98
import * as crypto from "crypto";
109

1110
/**
@@ -233,18 +232,8 @@ export function generateMarkdownDocs (config: Config, schema: Schema, docSchema:
233232
*/
234233
export async function generateReadme (docMD: string, config: Config, pkg: Package): Promise<void> {
235234
const template = await fs.readFile("README.template.md", "utf8");
236-
// check if project builds successfully
237-
const buildStatus = await new Promise((resolve) => {
238-
child_process.exec("npm run build", (error) => {
239-
resolve(!error);
240-
});
241-
});
242235
const shield = {
243-
version: `[![npm](https://img.shields.io/npm/v/cloudnode-ts)](https://www.npmjs.com/package/cloudnode-ts)`,
244236
apiVersion: `![API Version: ${config.apiVersion}](https://img.shields.io/badge/API%20Version-${config.apiVersion}-%232563eb)`,
245-
build: `![build: ${buildStatus ? "passing" : "failing"}](https://img.shields.io/badge/build-${buildStatus ? "passing" : "failing"}-%23${buildStatus ? "16a34a" : "dc2626"})`,
246-
codeQl: "[![CodeQL](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/cloudnode-pro/ts-client/actions/workflows/github-code-scanning/codeql)",
247-
downloads: `[![npm downloads](https://img.shields.io/npm/dt/cloudnode-ts?label=downloads)](https://www.npmjs.com/package/cloudnode-ts)`,
248237
};
249238
const rendered = Mustache.render(template, {config, pkg, docMD, shield});
250239
await fs.writeFile("README.md", rendered);

0 commit comments

Comments
 (0)