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
93 changes: 93 additions & 0 deletions .github/workflows/client_js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI (@topical/core)

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

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

defaults:
run:
working-directory: client_js

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: client_js/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_js/v')
runs-on: ubuntu-latest

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

permissions:
contents: write
id-token: write

defaults:
run:
working-directory: client_js

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Verify tag matches package.json version
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/client_js/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
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: CI (@topical/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: "20"
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: "20"
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
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml → .github/workflows/server_ex.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
name: CI
name: CI (Elixir)

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

jobs:
test:
Expand Down Expand Up @@ -52,7 +58,7 @@ jobs:
release:
name: Release to Hex
needs: test
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/server_ex/v')
runs-on: ubuntu-latest

defaults:
Expand Down Expand Up @@ -82,7 +88,7 @@ jobs:

- name: Verify tag matches mix.exs version
run: |
TAG_VERSION="${GITHUB_REF#refs/tags/v}"
TAG_VERSION="${GITHUB_REF#refs/tags/server_ex/v}"
MIX_VERSION=$(grep 'version:' mix.exs | sed 's/.*version: "\(.*\)".*/\1/')
echo "Tag version: $TAG_VERSION"
echo "mix.exs version: $MIX_VERSION"
Expand Down
18 changes: 18 additions & 0 deletions client_js/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