Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions .github/workflows/update-version-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ jobs:
- name: Set up Nix
uses: cachix/install-nix-action@v31

- name: Update version dashboard
run: nix-shell --run 'npm run generate:version-compatibility-dashboard'
- name: Update version dashboard and Wallet Gateway OpenRPC
env:
GH_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
run: |
nix-shell --run 'npm run generate:version-compatibility-dashboard'
nix-shell --run 'npm run update:generated-reference-sources -- --source wallet-gateway-openrpc'
nix-shell --run 'npm run generate:wallet-gateway-openrpc-reference'

- name: Detect changes
id: changes
Expand All @@ -45,16 +51,22 @@ jobs:
if: steps.changes.outputs.has_changes == 'true'
env:
GH_TOKEN: ${{ github.token }}
PR_BASE_BRANCH: ${{ github.ref_name }}
PR_BRANCH: version-dashboard/update
PR_TITLE: Update version dashboard data
PR_TITLE: Update version dashboard and generated references
run: |
set -euo pipefail

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git switch -c "$PR_BRANCH"
git add config/repo-version-config.json docs-main/snippets/generated/version-dashboard-data.mdx
git add \
config/repo-version-config.json \
config/x2mdx/wallet-gateway-openrpc/source-artifacts.json \
docs-main/docs.json \
docs-main/reference/wallet-gateway-json-rpc \
docs-main/snippets/generated/version-dashboard-data.mdx
git commit -m "$PR_TITLE"

if remote_sha="$(git ls-remote --heads origin "$PR_BRANCH" | awk '{print $1}')" && [[ -n "$remote_sha" ]]; then
Expand All @@ -67,16 +79,20 @@ jobs:
cat > "$pr_body" <<'EOF'
Updates the committed Canton Network version dashboard data from public network, package, and installer sources.

Also updates the Wallet Gateway OpenRPC source pin to the latest stable wallet-gateway-remote release and regenerates the checked-in Wallet Gateway OpenRPC reference pages.

Validation run by the workflow:
- `npm run generate:version-compatibility-dashboard`
- `npm run update:generated-reference-sources -- --source wallet-gateway-openrpc`
- `npm run generate:wallet-gateway-openrpc-reference`
- `git diff --check`
EOF

existing_pr_number="$(
gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head "$PR_BRANCH" \
--base main \
--base "$PR_BASE_BRANCH" \
--state open \
--json number \
--jq '.[0].number // empty'
Expand All @@ -87,11 +103,15 @@ jobs:
--repo "$GITHUB_REPOSITORY" \
--title "$PR_TITLE" \
--body-file "$pr_body"
gh pr ready "$existing_pr_number" \
--repo "$GITHUB_REPOSITORY" \
--undo
else
gh pr create \
--base main \
--base "$PR_BASE_BRANCH" \
--head "$PR_BRANCH" \
--repo "$GITHUB_REPOSITORY" \
--draft \
--title "$PR_TITLE" \
--body-file "$pr_body"
fi
2 changes: 1 addition & 1 deletion config/x2mdx/wallet-gateway-openrpc/source-artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"remote": "https://github.com/hyperledger-labs/splice-wallet-kernel.git",
"tag_prefix": "@canton-network/wallet-gateway-remote@",
"min_version": "0.24.0",
"publish_version": "0.25.0",
"publish_version": "1.4.0",
"specs": [
{
"spec_id": "dapp-api",
Expand Down
11 changes: 11 additions & 0 deletions docs-main/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1499,8 +1499,10 @@
"reference/wallet-gateway-json-rpc/operations/dapp-api/disconnect",
"reference/wallet-gateway-json-rpc/operations/dapp-api/getactivenetwork",
"reference/wallet-gateway-json-rpc/operations/dapp-api/getprimaryaccount",
"reference/wallet-gateway-json-rpc/operations/dapp-api/isconnected",
"reference/wallet-gateway-json-rpc/operations/dapp-api/ledgerapi",
"reference/wallet-gateway-json-rpc/operations/dapp-api/listaccounts",
"reference/wallet-gateway-json-rpc/operations/dapp-api/messagesignature",
"reference/wallet-gateway-json-rpc/operations/dapp-api/prepareexecute",
"reference/wallet-gateway-json-rpc/operations/dapp-api/prepareexecuteandwait",
"reference/wallet-gateway-json-rpc/operations/dapp-api/signmessage",
Expand All @@ -1518,8 +1520,10 @@
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/disconnect",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/getactivenetwork",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/getprimaryaccount",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/isconnected",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/ledgerapi",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/listaccounts",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/messagesignature",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/onstatuschanged",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/prepareexecute",
"reference/wallet-gateway-json-rpc/operations/dapp-remote-api/signmessage",
Expand All @@ -1541,12 +1545,16 @@
"reference/wallet-gateway-json-rpc/operations/user-api/addsession",
"reference/wallet-gateway-json-rpc/operations/user-api/allocatepartyforwallet",
"reference/wallet-gateway-json-rpc/operations/user-api/createwallet",
"reference/wallet-gateway-json-rpc/operations/user-api/deletemessagetosign",
"reference/wallet-gateway-json-rpc/operations/user-api/deletetransaction",
"reference/wallet-gateway-json-rpc/operations/user-api/execute",
"reference/wallet-gateway-json-rpc/operations/user-api/getmessagetosign",
"reference/wallet-gateway-json-rpc/operations/user-api/getnetwork",
"reference/wallet-gateway-json-rpc/operations/user-api/gettransaction",
"reference/wallet-gateway-json-rpc/operations/user-api/getuser",
"reference/wallet-gateway-json-rpc/operations/user-api/iswalletsyncneeded",
"reference/wallet-gateway-json-rpc/operations/user-api/listidps",
"reference/wallet-gateway-json-rpc/operations/user-api/listmessagestosign",
"reference/wallet-gateway-json-rpc/operations/user-api/listnetworks",
"reference/wallet-gateway-json-rpc/operations/user-api/listsessions",
"reference/wallet-gateway-json-rpc/operations/user-api/listtransactions",
Expand All @@ -1555,8 +1563,10 @@
"reference/wallet-gateway-json-rpc/operations/user-api/removenetwork",
"reference/wallet-gateway-json-rpc/operations/user-api/removesession",
"reference/wallet-gateway-json-rpc/operations/user-api/removewallet",
"reference/wallet-gateway-json-rpc/operations/user-api/selfsignedaccesstoken",
"reference/wallet-gateway-json-rpc/operations/user-api/setprimarywallet",
"reference/wallet-gateway-json-rpc/operations/user-api/sign",
"reference/wallet-gateway-json-rpc/operations/user-api/signmessage",
"reference/wallet-gateway-json-rpc/operations/user-api/syncwallets",
"reference/wallet-gateway-json-rpc/operations/user-api/details"
]
Expand All @@ -1570,6 +1580,7 @@
"reference/wallet-gateway-json-rpc/operations/signing-api/gettransaction",
"reference/wallet-gateway-json-rpc/operations/signing-api/gettransactions",
"reference/wallet-gateway-json-rpc/operations/signing-api/setconfiguration",
"reference/wallet-gateway-json-rpc/operations/signing-api/signmessage",
"reference/wallet-gateway-json-rpc/operations/signing-api/signtransaction",
"reference/wallet-gateway-json-rpc/operations/signing-api/subscribetransactions",
"reference/wallet-gateway-json-rpc/operations/signing-api/details"
Expand Down
Loading