Skip to content

Commit 7d7a2c8

Browse files
authored
feat: autogenerate package list in README (#3109)
1 parent e062198 commit 7d7a2c8

File tree

11 files changed

+317
-34
lines changed

11 files changed

+317
-34
lines changed

.github/workflows/release-please.yml

+22
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,31 @@ on:
88
jobs:
99
release-please:
1010
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node: [18.19.x]
1114
steps:
15+
- uses: graycoreio/github-actions/setup-node@main
16+
with:
17+
node-version: ${{ matrix.node }}
18+
use-stamp-cache: true
19+
1220
- uses: google-github-actions/release-please-action@v3
1321
with:
1422
token: ${{ secrets.GRAYCORE_GITHUB_TOKEN }}
1523
command: manifest
1624
default-branch: develop
25+
26+
- uses: actions/checkout@v4
27+
with:
28+
ref: release-please--branches--develop--components--daffodil
29+
30+
- name: Add Packages to README
31+
run: |
32+
git config user.email "[email protected]"
33+
git config user.name "Github CI"
34+
cd tools/release
35+
npx gulp addPackagesToReadme
36+
git add README.md
37+
git commit -m 'docs: autogenerate package table in README' || true
38+
git push

README.md

+45-18
Large diffs are not rendered by default.

package-lock.json

+181
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"@types/jasmine": "~3.6.0",
7474
"@types/jasminewd2": "~2.0.8",
7575
"@types/node": "18.19.8",
76+
"@types/through2": "^2.0.41",
7677
"@typescript-eslint/eslint-plugin": "^8.0.0",
7778
"@typescript-eslint/parser": "^8.0.0",
7879
"dgeni": "^0.4.14",
@@ -86,6 +87,8 @@
8687
"eslint-plugin-prefer-arrow": "^1.2.3",
8788
"gulp": "^4.0.2",
8889
"gulp-execa": "^1.1.0",
90+
"gulp-reduce-async": "^1.0.0",
91+
"gulp-replace": "^1.1.4",
8992
"highlight.js": "^11.9.0",
9093
"jasmine": "^4.6.0",
9194
"jasmine-core": "^4.6.0",

tools/release/args/args.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import * as minimist from 'minimist';
1+
import minimist from 'minimist';
22

33
export const ARGS = minimist(process.argv.slice(2));

tools/release/cleanup/cleanup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { series } from 'gulp';
2-
import * as git from 'simple-git/promise';
2+
import git from 'simple-git/promise';
33

44
import { ARGS } from '../args/args';
55
import { ARG as GIT_REMOTE_ARG } from '../args/git-remote';
+10-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import { series } from 'gulp';
2+
import git from 'simple-git/promise';
13
import * as standardVersion from 'standard-version';
2-
import * as git from 'simple-git/promise';
4+
35
import { RELEASE_CONFIG } from '../config';
4-
import { series } from 'gulp';
6+
57

68
const stageAll = async (): Promise<void> => {
7-
await git(RELEASE_CONFIG.PROJECT_PATH).add('.');
8-
}
9+
await git(RELEASE_CONFIG.PROJECT_PATH).add('.');
10+
};
911

1012
const generateCommit = () => standardVersion({
1113
noVerify: true,
@@ -19,12 +21,12 @@ const generateCommit = () => standardVersion({
1921
packageFiles: [
2022
RELEASE_CONFIG.PROJECT_PATH + '/package.json',
2123
],
22-
bumpFiles: []
24+
bumpFiles: [],
2325
}).catch(err => {
24-
console.error(`standard-version failed with message: ${err.message}`)
26+
console.error(`standard-version failed with message: ${err.message}`);
2527
});
2628

2729
export const commitChangelogAndTag = series(
2830
stageAll,
29-
generateCommit
30-
)
31+
generateCommit,
32+
);

tools/release/gulpfile.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { prepare } from './prepare/prepare';
99
import { publish } from './publish/publish';
1010
import { leafVersion } from './version/leaf-version';
1111
import { version } from './version/version';
12+
export { addPackagesToReadme } from './packages/add-packages-to-readme';
1213

1314
export const release = series(
1415
prepare,

0 commit comments

Comments
 (0)