Skip to content

Commit 3eb509e

Browse files
committed
Merge pull request hpcc-systems#4255 from GordonSmith/release-please/bootstrap/default
feat: Switch to release-please for versioning and publishing Signed-off-by: Gordon Smith <[email protected]>
2 parents 1af6b8a + 3e913a6 commit 3eb509e

File tree

6 files changed

+209
-4
lines changed

6 files changed

+209
-4
lines changed

.github/workflows/release-please.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
on:
2+
push:
3+
branches:
4+
- trunk
5+
- candidate-3.x.x
6+
7+
permissions:
8+
contents: write
9+
pull-requests: write
10+
11+
name: release-please
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Initialize Release Please
18+
id: release
19+
uses: googleapis/release-please-action@v4
20+
with:
21+
target-branch: ${{ github.ref_name }}
22+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
23+
config-file: release-please-config.json
24+
manifest-file: .release-please-manifest.json
25+
26+
- name: Checkout Sources
27+
if: ${{ steps.release.outputs.release_created }}
28+
uses: actions/checkout@v4
29+
30+
- name: Install NodeJS
31+
if: ${{ steps.release.outputs.release_created }}
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 20
35+
registry-url: "https://registry.npmjs.org"
36+
scope: "@hpcc-js"
37+
38+
- name: Install OS Dependencies
39+
if: ${{ steps.release.outputs.release_created }}
40+
run: |
41+
pip install pandas scikit-learn
42+
43+
- name: Export GitHub Actions cache environment variables
44+
if: ${{ steps.release.outputs.release_created }}
45+
uses: actions/github-script@v7
46+
with:
47+
script: |
48+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
49+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
50+
51+
- name: Install Dependencies
52+
if: ${{ steps.release.outputs.release_created }}
53+
run: |
54+
npm ci
55+
56+
- name: Lint
57+
if: ${{ steps.release.outputs.release_created }}
58+
run: |
59+
npm run lint-all
60+
61+
- name: Build
62+
if: ${{ steps.release.outputs.release_created }}
63+
run: |
64+
npm run build
65+
66+
- name: Install Test Dependencies
67+
if: ${{ steps.release.outputs.release_created }}
68+
run: |
69+
sudo apt-get update
70+
sudo npx -y playwright install chromium --with-deps
71+
npx -y playwright install chromium
72+
wget https://github.com/hpcc-systems/HPCC-Platform/releases/download/community_9.6.50-1/hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb
73+
74+
- name: Install HPCC Platform
75+
if: ${{ steps.release.outputs.release_created }}
76+
continue-on-error: true
77+
run: |
78+
sudo apt install -f ./hpccsystems-platform-community_9.6.50-1jammy_amd64_withsymbols.deb
79+
sudo /etc/init.d/hpcc-init start
80+
81+
- name: Test
82+
if: ${{ steps.release.outputs.release_created }}
83+
env:
84+
CI: true
85+
run: |
86+
npm run test-local
87+
88+
# - name: Calculate Coverage
89+
# if: ${{ steps.release.outputs.release_created }}
90+
# run: |
91+
# npm run coverage
92+
93+
# - name: Update Coveralls
94+
# if: ${{ steps.release.outputs.release_created }}
95+
# uses: coverallsapp/github-action@v2
96+
# with:
97+
# github-token: ${{ secrets.GITHUB_TOKEN }}
98+
99+
- name: Publish
100+
if: ${{ steps.release.outputs.release_created }}
101+
env:
102+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
103+
run: |
104+
npm run publish
105+
106+
- name: Purge jsdelivr
107+
if: ${{ steps.release.outputs.release_created }}
108+
run: |
109+
npm run purge-jsdelivr
110+
111+
- name: Upload error logs
112+
if: ${{ failure() || cancelled() }}
113+
uses: actions/upload-artifact@v4
114+
with:
115+
name: all-logs
116+
path: ./**/*.log

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.eclcc
2+
.env
23
.nx
34
node_modules
45
dist/
@@ -36,3 +37,5 @@ tmp*.json
3637
/demos/rwc2019
3738
demos/h3/data
3839
.nx/cache
40+
.nx/workspace-data
41+
/packages/markdown-it-plugins/docs/obt/data

.release-please-manifest.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
".": "2.106.11",
3+
"packages/api": "2.13.0",
4+
"packages/chart": "2.85.0",
5+
"packages/codemirror": "2.63.0",
6+
"packages/codemirror-shim": "2.36.0",
7+
"packages/common": "2.72.0",
8+
"packages/comms": "2.97.0",
9+
"packages/composite": "2.8.2",
10+
"packages/dataflow": "9.0.0",
11+
"packages/ddl-shim": "2.21.0",
12+
"packages/deck-shim": "2.7.0",
13+
"packages/dgrid": "2.33.0",
14+
"packages/dgrid-shim": "2.25.0",
15+
"packages/dgrid2": "2.4.0",
16+
"packages/eclwatch": "2.75.8",
17+
"packages/esbuild-plugins": "1.1.2",
18+
"packages/form": "2.11.2",
19+
"packages/graph": "2.86.0",
20+
"packages/html": "2.43.0",
21+
"packages/layout": "2.50.2",
22+
"packages/leaflet-shim": "2.4.0",
23+
"packages/loader": "2.106.11",
24+
"packages/map": "2.78.2",
25+
"packages/map-deck": "2.8.0",
26+
"packages/marshaller": "2.26.8",
27+
"packages/observable-md": "2.54.19",
28+
"packages/observablehq-compiler": "1.3.0",
29+
"packages/other": "2.16.2",
30+
"packages/phosphor": "2.19.2",
31+
"packages/phosphor-shim": "2.15.0",
32+
"packages/preact-shim": "2.17.0",
33+
"packages/react": "2.54.0",
34+
"packages/requirejs-shim": "2.2.0",
35+
"packages/timeline": "2.53.1",
36+
"packages/tree": "2.41.0",
37+
"packages/util": "2.52.0"
38+
}

lerna.json

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"useNx": true,
32
"command": {
43
"version": {
54
"conventionalCommits": true,
@@ -14,5 +13,5 @@
1413
},
1514
"version": "independent",
1615
"npmClient": "npm",
17-
"lerna": "3.6.0"
18-
}
16+
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
17+
}

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"publish-prep": "run-s publish-clean-lint publish-version stamp build-all minimize gen-legacy-types test",
105105
"publish-finalize": "run-s publish-commit publish-lerna",
106106
"publish-gh-actions": "npm ci && npm run lint && npm run build && npm run minimize && npm run compile-umd && npm run build-gallery && npm run build-test && npm run test && npm run publish-lerna",
107+
"publish": "lerna publish from-package -y",
107108
"tag": "run-s publish-version stamp stamp-main publish-update-lock publish-commit publish-tag publish-push",
108109
"purge-jsdelivr": "node ./utils/purge-jsdelivr.js",
109110
"serve-docs": "vitepress dev .",
@@ -178,4 +179,4 @@
178179
"author": "HPCC Systems",
179180
"license": "Apache-2.0",
180181
"homepage": "https://github.com/hpcc-systems/Visualization"
181-
}
182+
}

release-please-config.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "node",
4+
"packages": {
5+
".": {},
6+
"packages/api": {},
7+
"packages/chart": {},
8+
"packages/codemirror": {},
9+
"packages/codemirror-shim": {},
10+
"packages/common": {},
11+
"packages/comms": {},
12+
"packages/composite": {},
13+
"packages/dataflow": {},
14+
"packages/ddl-shim": {},
15+
"packages/deck-shim": {},
16+
"packages/dgrid": {},
17+
"packages/dgrid-shim": {},
18+
"packages/dgrid2": {},
19+
"packages/eclwatch": {},
20+
"packages/esbuild-plugins": {},
21+
"packages/form": {},
22+
"packages/graph": {},
23+
"packages/html": {},
24+
"packages/layout": {},
25+
"packages/leaflet-shim": {},
26+
"packages/loader": {},
27+
"packages/map": {},
28+
"packages/map-deck": {},
29+
"packages/marshaller": {},
30+
"packages/observable-md": {},
31+
"packages/observable-shim": {},
32+
"packages/observablehq-compiler": {},
33+
"packages/other": {},
34+
"packages/phosphor": {},
35+
"packages/phosphor-shim": {},
36+
"packages/preact-shim": {},
37+
"packages/react": {},
38+
"packages/requirejs-shim": {},
39+
"packages/timeline": {},
40+
"packages/tree": {},
41+
"packages/util": {}
42+
},
43+
"plugins": [
44+
{
45+
"type": "node-workspace"
46+
}
47+
]
48+
}

0 commit comments

Comments
 (0)