Skip to content

Commit 4318f5e

Browse files
authored
Automate Cadence release data onto documentation (#217)
1 parent 3e0b66a commit 4318f5e

File tree

17 files changed

+4104
-17
lines changed

17 files changed

+4104
-17
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Fetch release data
2+
on:
3+
schedule:
4+
# Run every 8 hours
5+
- cron: '0 */8 * * *'
6+
workflow_dispatch:
7+
permissions:
8+
contents: write
9+
jobs:
10+
fetch-release-data:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
sparse-checkout: |
16+
scripts
17+
static/data/releases
18+
- run: |
19+
./scripts/fetch-releases.sh
20+
if git diff --quiet static/data/releases; then
21+
echo "No changes to commit"
22+
exit 0
23+
fi
24+
git config user.name "github-actions[bot]"
25+
git config user.email "github-actions[bot]@users.noreply.github.com"
26+
git add static/data/releases
27+
git commit -m "Update release data"
28+
git push
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ $ GIT_USER=<Your GitHub username> npm run deploy
6262
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
6363

6464

65+
### Updating Release Data
66+
67+
The release pages rely on data from GitHub that is persisted as json files under `static/data/releases/`.
68+
In order to update the release information for display, this can be done manually or be set up as part of the CI/CD process by running the `scripts/fetch-releases.sh` script. Script uses the [GitHub CLI](https://cli.github.com/) to fetch the release data.
69+
6570
# NPM Registry
6671

6772
Ensure you have a `.npmrc` [file](https://docs.npmjs.com/cli/v9/configuring-npm/npmrc/) configured with `registry=https://registry.npmjs.org/`.

docs/01-get-started/02-java-hello-world.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ You can also review [Java-Client](/docs/java-client) and [java-docs](https://www
1414

1515
## Include Cadence Java Client Dependency
1616

17-
Go to the [Maven Repository Uber Cadence Java Client Page](https://mvnrepository.com/artifact/com.uber.cadence/cadence-client)
18-
and find the latest version of the library. Include it as a dependency into your Java project. For example if you
19-
are using Gradle the dependency looks like:
20-
```bash
17+
Custom snippets for including the Cadence Java Client can be found in the [cadence-client](https://central.sonatype.com/artifact/com.uber.cadence/cadence-client) page on Maven Central. Latest version is available in the [Cadence Java Client Releases](/docs/releases/cadence-java-client) page
18+
19+
Include the cadence-client as a dependency into your Java project. For example if you
20+
are using Gradle, the dependency looks like:
21+
```gradle
2122
implementation group: 'com.uber.cadence', name: 'cadence-client', version: '<latest_version>'
2223
```
2324
Also add the following dependencies that cadence-client relies on:
24-
```bash
25+
```gradle
2526
implementation group: 'commons-configuration', name: 'commons-configuration', version: '1.9'
2627
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
2728
```
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
layout: default
3+
title: Cadence Go Client Releases
4+
description: Release Notes
5+
permalink: /docs/releases/cadence-go-client
6+
---
7+
8+
# Cadence Go Client
9+
10+
import {ListReleases, getReleaseData, getLatestRelease} from '@site/src/components/CadenceReleases';
11+
export const releases = getReleaseData('cadence-go-client.json');
12+
export const latestRelease = getLatestRelease(releases);
13+
14+
15+
Cadence follows [semantic versioning](https://semver.org/spec/v2.0.0.html) and you can find more information about changes between version on the Cadence [changelog](https://github.com/cadence-workflow/cadence/blob/master/CHANGELOG.md).
16+
17+
:::tip[Latest release for General Availability]
18+
19+
> <strong><a href={latestRelease.html_url} target="_blank">{latestRelease.name}</a> </strong>published on {latestRelease.published_at_date}
20+
21+
:::
22+
23+
## Major Releases
24+
<ListReleases releases={releases}></ListReleases>
25+
26+
---
27+
28+
For a comprehensive list of changes and detailed release notes, please visit the [Cadence Go Client GitHub Releases page](https://github.com/cadence-workflow/cadence-go-client/releases).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default
3+
title: Cadence Java Client Releases
4+
description: Release Notes
5+
permalink: /docs/releases/cadence-java-client
6+
---
7+
8+
# Cadence Java Client
9+
10+
import {ListReleases, getReleaseData, getLatestRelease} from '@site/src/components/CadenceReleases';
11+
export const releases = getReleaseData('cadence-java-client.json');
12+
export const latestRelease = getLatestRelease(releases);
13+
14+
15+
Cadence follows [semantic versioning](https://semver.org/spec/v2.0.0.html) and you can find more information about changes between version on the Cadence [changelog](https://github.com/cadence-workflow/cadence/blob/master/CHANGELOG.md).
16+
17+
:::tip[Latest release for General Availability]
18+
19+
> <strong><a href={latestRelease.html_url} target="_blank">{latestRelease.name}</a> </strong>published on {latestRelease.published_at_date}
20+
21+
:::
22+
23+
:::info[Java Compatibility]
24+
25+
Java versions 21, 17 and 11 are supported at this time.
26+
27+
Due to backward compatibility, Java versions 17+ require the following JVM flag
28+
```
29+
--add-opens java.base/java.lang=ALL-UNNAMED
30+
```
31+
32+
:::
33+
34+
## Major Releases
35+
<ListReleases releases={releases}></ListReleases>
36+
37+
---
38+
39+
For a comprehensive list of changes and detailed release notes, please visit the [Cadence Java Client GitHub Releases page](https://github.com/cadence-workflow/cadence-java-client/releases).

docs/09-releases/cadence.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: default
3+
title: Cadence Service Releases
4+
description: Release Notes
5+
permalink: /docs/releases
6+
---
7+
8+
import {
9+
ListReleases,
10+
getReleaseData,
11+
getLatestRelease,
12+
} from "@site/src/components/CadenceReleases";
13+
14+
export const releases = getReleaseData("cadence.json");
15+
export const latestRelease = getLatestRelease(releases);
16+
17+
Cadence follows [semantic versioning](https://semver.org/spec/v2.0.0.html) and you can find more information about changes between version on the Cadence [changelog](https://github.com/cadence-workflow/cadence/blob/master/CHANGELOG.md).
18+
19+
:::tip[Latest release for General Availability]
20+
21+
> <strong><a href={latestRelease.html_url} target="_blank">{latestRelease.name}</a> </strong>published on {latestRelease.published_at_date}
22+
23+
:::
24+
25+
## Major Releases
26+
<ListReleases releases={releases}></ListReleases>
27+
28+
---
29+
30+
For a comprehensive list of changes and detailed release notes, please visit the [Cadence GitHub Releases page](https://github.com/cadence-workflow/cadence/releases).
File renamed without changes.
File renamed without changes.

package-lock.json

Lines changed: 86 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cadence",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
@@ -26,18 +26,22 @@
2626
"@docusaurus/preset-classic": "^3.7.0",
2727
"@docusaurus/remark-plugin-npm2yarn": "^3.7.0",
2828
"@docusaurus/theme-search-algolia": "^3.7.0",
29+
"@iconify/react": "^5.2.0",
2930
"@mdx-js/react": "^3.0.0",
3031
"@pnpm/config.env-replace": "^3.0.0",
3132
"clsx": "^2.0.0",
33+
"lodash": "^4.17.21",
3234
"prism-react-renderer": "^2.3.0",
3335
"react": "^18.0.0",
3436
"react-dom": "^18.0.0",
37+
"react-markdown": "^9.0.3",
3538
"remark-math": "^6.0.0"
3639
},
3740
"devDependencies": {
3841
"@docusaurus/module-type-aliases": "^3.7.0",
3942
"@docusaurus/tsconfig": "^3.7.0",
4043
"@docusaurus/types": "^3.7.0",
44+
"@types/lodash": "^4.17.15",
4145
"typescript": "~5.6.2"
4246
},
4347
"browserslist": {

0 commit comments

Comments
 (0)