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
2 changes: 1 addition & 1 deletion .github/workflows/client_js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI (@topical/core)
name: Client (JavaScript)

on:
push:
Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/client_react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Client (React)

on:
push:
branches: [main]
tags: ["client_react/v*"]
paths:
- "client_react/**"
- ".github/workflows/client_react.yml"
pull_request:
branches: [main]
paths:
- "client_react/**"
- ".github/workflows/client_react.yml"

jobs:
test:
name: Test
runs-on: ubuntu-latest

defaults:
run:
working-directory: client_react

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
cache-dependency-path: client_react/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Check
run: npm run check

release:
name: Release to npm
needs: test
if: startsWith(github.ref, 'refs/tags/client_react/v')
runs-on: ubuntu-latest

concurrency:
group: release-client-react
cancel-in-progress: false

permissions:
contents: write
id-token: write

defaults:
run:
working-directory: client_react

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: client_react/package-lock.json

- name: Install dependencies
run: npm ci

- name: Verify tag matches package.json version
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/client_react/v}"
PKG_VERSION=$(node -p "require('./package.json').version")
echo "Tag version: $TAG_VERSION"
echo "package.json version: $PKG_VERSION"
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "::error::Tag version ($TAG_VERSION) does not match package.json version ($PKG_VERSION)"
exit 1
fi

- name: Publish to npm
run: npm publish

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
5 changes: 5 additions & 0 deletions client_react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 0.3.2

### Features

- Adds support for optional topic parameters.

## 0.3.1

Expand Down
18 changes: 18 additions & 0 deletions client_react/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
"files": {
"includes": ["src/**"]
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
}
}
Loading
Loading