Skip to content

Commit 168ff34

Browse files
authored
Deploy @deephaven/jsapi-types during release, provide tools for nightly builds (deephaven#4907)
Like other packages, the npmjs package for jsapi types will now get its version assigned as it is built from gradle. Also reads properties from gradle to specify --preid to npm (e.g. -PnpmPreid=nightly), to be given a date stamp suffix. Public job for CI will now deploy tagged versions to npmjs. Fixes deephaven#4888 Fixes deephaven#5081
1 parent 4d3947b commit 168ff34

File tree

17 files changed

+655
-543
lines changed

17 files changed

+655
-543
lines changed

.github/workflows/publish-ci.yml

+17-4
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,29 @@ jobs:
3939
.github/scripts/gradle-properties.sh >> gradle.properties
4040
cat gradle.properties
4141
42+
- name: Setup Node for deployment to npmjs
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version-file: 'web/client-api/types/.nvmrc'
46+
registry-url: 'https://registry.npmjs.org'
47+
4248
# TODO(deephaven-core#2614): Improve gradle/CI assemble and publishing of artifacts
4349

44-
- name: Publish to Maven Local
50+
- name: Build all artifacts, publish to Maven Local
4551
if: ${{ !startsWith(github.ref, 'refs/heads/release/v') }}
4652
uses: burrunan/gradle-cache-action@v1
4753
with:
4854
job-id: publish-local
49-
arguments: server-netty-app:build server-jetty-app:build py-server:build py-embedded-server:build py-client:build publishToMavenLocal
55+
arguments: server-netty-app:build server-jetty-app:build py-server:build py-embedded-server:build py-client:build web-client-api:types:build publishToMavenLocal
5056
gradle-version: wrapper
5157

52-
- name: Publish
58+
- name: Build all artifacts, publish to Sonatype for staging to Maven Central
5359
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
5460
uses: burrunan/gradle-cache-action@v1
5561
with:
5662
job-id: publish
5763
# We need to be explicit here about no parallelism to ensure we don't create disjointed staging repositories.
58-
arguments: --no-parallel server-netty-app:build server-jetty-app:build py-server:build py-client:build py-embedded-server:build publish
64+
arguments: --no-parallel server-netty-app:build server-jetty-app:build py-server:build py-client:build py-embedded-server:build web-client-api:types:build publish
5965
gradle-version: wrapper
6066
env:
6167
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.SONATYPE_USERNAME }}
@@ -74,6 +80,7 @@ jobs:
7480
py/server/build/wheel/
7581
py/embedded-server/build/wheel/
7682
py/client/build/wheel/
83+
web/client-api/types/build/*.tgz
7784
7885
- name: Publish deephaven-core to PyPi
7986
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
@@ -98,3 +105,9 @@ jobs:
98105
user: __token__
99106
password: ${{ secrets.PYDEEPHAVEN_PYPI_TOKEN }}
100107
packages_dir: py/client/build/wheel/
108+
109+
- name: Publish @deephaven/jsapi-types to npmjs
110+
if: ${{ startsWith(github.ref, 'refs/heads/release/v') }}
111+
env:
112+
NODE_AUTH_TOKEN: ${{ secrets.DEEPHAVENBOT_NPM_TOKEN }}
113+
run: npm publish --tag latest web/client-api/types/build/deephaven-jsapi-types-*.tgz

RELEASE.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ If this step fails, the deephaven-server wheel from the "Upload Artifacts" step
161161
The "Publish pydeephaven to PyPi" uploads the pydeephaven wheel to [PyPi](https://pypi.org/project/pydeephaven/).
162162
If this step fails, the pydeephaven wheel from the "Upload Artifacts" step can be uploaded manually.
163163

164+
The "Publish @deephaven/jsapi-types to npmjs" uploads the TypeScript tarball to [NPM](https://www.npmjs.com/package/@deephaven/jsapi-types).
165+
If this step fails, the deephaven-jsapi-types tarball from the "Upload Artifacts" step can be uploaded manually.
166+
164167
Once the workflow job is done, ensure all publication sources have the new artifacts.
165168

166169
### 5. Download artifacts
@@ -225,7 +228,7 @@ Create a new [GitHub release](https://github.com/deephaven/deephaven-core/releas
225228

226229
The convention is to have the Release title of the form `vX.Y.Z` and to autogenerate the release notes in comparison to the previous release tag. Question: should we always generate release notes based off of the previous minor release, instead of patch? Our git release workflow suggests we may want to do it always minor to minor.
227230

228-
Upload the Deephaven server application, deephaven-core wheel, pydeephaven wheel, and SBOM artifacts. Also, upload the C++, Java, Python, R and TypeScript docs artifacts.
231+
Upload the Deephaven server application, deephaven-core wheel, pydeephaven wheel, @deephaven/jsapi-types tarball, and SBOM artifacts. Also, upload the C++, Java, Python, R and TypeScript docs artifacts.
229232
(These are the artifacts downloaded in Step #5)
230233

231234
Hit the GitHub "Publish release" button.
@@ -269,7 +272,6 @@ mention the version explicitly. These files are listed below:
269272
#
270273
gradle.properties
271274
R/rdeephaven/DESCRIPTION
272-
web/client-api/types/package.json
273275
```
274276

275277
This leaves the files "ready" for the next regular release, and also ensures any build done from
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
io.deephaven.project.ProjectType=DOCKER_REGISTRY
2-
deephaven.registry.imageName=node:14
3-
deephaven.registry.imageId=node@sha256:a158d3b9b4e3fa813fa6c8c590b8f0a860e015ad4e59bbce5744d2f6fd8461aa
2+
deephaven.registry.imageName=node:20
3+
deephaven.registry.imageId=node@sha256:445acd9b2ef7e9de665424053bf95652e0b8995ef36500557d48faf29300170a

proto/raw-js-openapi/.npmrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
engine-strict=true
2+
provenance=true

proto/raw-js-openapi/.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.10.0

proto/raw-js-openapi/build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ def webpackSources = Docker.registerDockerTask(project, 'webpackSources') {
3434
into 'raw-js-openapi/'
3535
}
3636
from ('Dockerfile')
37-
from ('../package.json')
38-
from ('../package-lock.json')
37+
from ('package.json')
38+
from ('package-lock.json')
39+
from ('.npmrc')
3940
}
4041
parentContainers = [ Docker.registryTask(project, 'node') ]
4142
imageName = 'deephaven/js-out:local-build'

0 commit comments

Comments
 (0)