Skip to content
Merged
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
90 changes: 72 additions & 18 deletions .github/workflows/update-connect-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ jobs:
ref: main
persist-credentials: false

- name: Read specification source identity
id: specification
run: |
echo "repository=$(jq -r '.specification.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "ref=$(jq -r '.specification.ref' site-sources.json)" >> "$GITHUB_OUTPUT"

- name: Check out specification
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.specification.outputs.repository }}
ref: ${{ steps.specification.outputs.ref }}
path: .sources/mdbase-spec
persist-credentials: false

- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
version: 10
Expand All @@ -71,17 +57,85 @@ jobs:
- name: Install website dependencies
run: pnpm install --frozen-lockfile

- name: Build specification artifact
working-directory: .sources/mdbase-spec/site
run: npm ci && npm run build

- name: Verify public evidence and generate release record
env:
GH_TOKEN: ${{ github.token }}
MDBASE_RELEASE_NPM_ATTEMPTS: "15"
MDBASE_RELEASE_NPM_DELAY_MS: "60000"
run: node scripts/update-connect-release.mjs '${{ steps.release.outputs.tag }}'

# Read after the release record, which moves the Connect ref to the tag.
- name: Read pinned source identities
id: sources
run: |
echo "spec_repository=$(jq -r '.specification.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "spec_ref=$(jq -r '.specification.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "connect_repository=$(jq -r '.connect.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "connect_ref=$(jq -r '.connect.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "contracts_repository=$(jq -r '.contracts.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "contracts_ref=$(jq -r '.contracts.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "rust_repository=$(jq -r '.implementations[] | select(.id == "rust") | .repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "rust_ref=$(jq -r '.implementations[] | select(.id == "rust") | .ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "typescript_repository=$(jq -r '.implementations[] | select(.id == "typescript") | .repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "typescript_ref=$(jq -r '.implementations[] | select(.id == "typescript") | .ref' site-sources.json)" >> "$GITHUB_OUTPUT"

- name: Check out specification
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.sources.outputs.spec_repository }}
ref: ${{ steps.sources.outputs.spec_ref }}
path: .sources/mdbase-spec
persist-credentials: false

- name: Check out Connect
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.sources.outputs.connect_repository }}
ref: ${{ steps.sources.outputs.connect_ref }}
path: .sources/mdbase-connect
persist-credentials: false

- name: Check out contracts
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.sources.outputs.contracts_repository }}
ref: ${{ steps.sources.outputs.contracts_ref }}
path: .sources/mdbase-contracts
persist-credentials: false

- name: Check out Rust implementation
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.sources.outputs.rust_repository }}
ref: ${{ steps.sources.outputs.rust_ref }}
path: .sources/mdbase-rs
persist-credentials: false

- name: Check out TypeScript implementation
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ steps.sources.outputs.typescript_repository }}
ref: ${{ steps.sources.outputs.typescript_ref }}
path: .sources/mdbase
persist-credentials: false

- name: Build contract catalog
working-directory: .sources/mdbase-contracts
run: npm ci && npm run build

- name: Build specification artifact
working-directory: .sources/mdbase-spec/site
run: npm ci && npm run build

- name: Synchronize schemas, contracts, and conformance claims
run: pnpm sync:sources
env:
MDBASE_SPEC_DIR: .sources/mdbase-spec
MDBASE_CONNECT_DIR: .sources/mdbase-connect
MDBASE_CONTRACTS_DIR: .sources/mdbase-contracts
MDBASE_RS_DIR: .sources/mdbase-rs
MDBASE_TS_DIR: .sources/mdbase

- name: Validate generated website
env:
GH_TOKEN: ${{ github.token }}
Expand Down
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,19 @@ dist/
.sources/
.DS_Store


# Generated by `pnpm sync:sources` from the refs pinned in site-sources.json.
# CI and deployment regenerate them before every build.
/public/connect/schemas/*
!/public/connect/schemas/contract-extension.v1.schema.json
/public/contracts/
/public/interop/schemas/v0.1/
/public/testbed/schemas/v0.1/
/public/testbed/v0.1/
/public/runtime/schemas/v0.2/
/public/mdbase-introduction.css
/public/mdbase-theme.css
/public/mdbase-shell.css
/public/theme-bootstrap.js
/src/data/contracts.json
/src/data/conformance.json
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ pnpm dev
The source synchronizer reads sibling checkouts of `mdbase-spec`,
`mdbase-connect`, `mdbase-contracts`, `mdbase-rs`, and `mdbase` by default.
Override their paths with `MDBASE_SPEC_DIR`, `MDBASE_CONNECT_DIR`,
`MDBASE_CONTRACTS_DIR`, `MDBASE_RS_DIR`, and `MDBASE_TS_DIR`.
`MDBASE_CONTRACTS_DIR`, `MDBASE_RS_DIR`, and `MDBASE_TS_DIR`. Check those
checkouts out at the refs in `site-sources.json` to match production. The
synchronized schemas, contracts and conformance data are generated and
untracked (see `.gitignore`), so run the synchronizer before building. CI,
deployment and the Connect release update all regenerate them from the pinned
refs. To change what the site publishes, change `site-sources.json`.

## Production build

Expand Down
40 changes: 0 additions & 40 deletions public/connect/schemas/application-capability-catalog.v1.json

This file was deleted.

68 changes: 0 additions & 68 deletions public/connect/schemas/application-capability-catalog.v2.json

This file was deleted.

17 changes: 0 additions & 17 deletions public/connect/schemas/catalog.json

This file was deleted.

48 changes: 0 additions & 48 deletions public/connect/schemas/change-events.v1.json

This file was deleted.

Loading
Loading