Skip to content

feat(spaces,client): add createPrefsStore, device pairing, sealed blo… #347

feat(spaces,client): add createPrefsStore, device pairing, sealed blo…

feat(spaces,client): add createPrefsStore, device pairing, sealed blo… #347

name: Publish TS Packages to npm
on:
push:
tags:
- "v*"
branches:
- "master"
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Run tests
run: pnpm test
setup:
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
outputs:
version: ${{ steps.meta.outputs.version }}
npm_tag: ${{ steps.meta.outputs.npm_tag }}
steps:
- name: Compute version and dist-tag
id: meta
run: |
VERSION="${GITHUB_REF_NAME#v}"
if echo "$VERSION" | grep -qE '(alpha|beta|rc)'; then
NPM_TAG=$(echo "$VERSION" | grep -oE 'alpha|beta|rc' | head -1)
else
NPM_TAG=latest
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "npm_tag=$NPM_TAG" >> $GITHUB_OUTPUT
publish-protocol:
needs: setup
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/protocol
npm pkg set "version=$VERSION"
- name: Publish starfish-protocol
working-directory: packages/ts/protocol
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-client:
needs: [setup, publish-protocol]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/client
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
- name: Publish starfish-client
working-directory: packages/ts/client
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-server:
needs: [setup, publish-protocol]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/server
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
- name: Publish starfish-server
working-directory: packages/ts/server
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-keyring:
needs: [setup, publish-client]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/keyring
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-client=$VERSION"
- name: Publish starfish-keyring
working-directory: packages/ts/keyring
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-identities:
needs: [setup, publish-keyring]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/identities
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-client=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-keyring=$VERSION"
- name: Publish starfish-identities
working-directory: packages/ts/identities
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-sharing:
needs: [setup, publish-keyring]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/sharing
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-client=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-keyring=$VERSION"
- name: Publish starfish-sharing
working-directory: packages/ts/sharing
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-entitlements:
needs: [setup, publish-client, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/entitlements
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-client=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-entitlements
working-directory: packages/ts/entitlements
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-audit:
needs: [setup, publish-protocol]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/audit
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
- name: Publish starfish-audit
working-directory: packages/ts/audit
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-queuing:
needs: [setup, publish-protocol]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/queuing
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
- name: Publish starfish-queuing
working-directory: packages/ts/queuing
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-replica:
needs: [setup, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/replica
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-replica
working-directory: packages/ts/replica
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-projection:
needs: [setup, publish-protocol, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/projection
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-projection
working-directory: packages/ts/projection
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-restrictions:
needs: [setup, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/restrictions
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-restrictions
working-directory: packages/ts/restrictions
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-outbox:
needs: [setup, test]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/outbox
npm pkg set "version=$VERSION"
- name: Publish starfish-outbox
working-directory: packages/ts/outbox
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-wal:
needs: [setup, publish-protocol]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/wal
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
- name: Publish starfish-wal
working-directory: packages/ts/wal
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-events:
needs: [setup, publish-protocol, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/events
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-events
working-directory: packages/ts/events
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-spaces:
needs: [setup, publish-identities, publish-sharing, publish-server]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/spaces
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-client=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-keyring=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-sharing=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-identities=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-server=$VERSION"
- name: Publish starfish-spaces
working-directory: packages/ts/spaces
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}
publish-webhook:
needs: [setup, publish-keyring]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
- uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
registry-url: "https://registry.npmjs.org"
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Set version from tag
run: |
VERSION="${{ needs.setup.outputs.version }}"
cd packages/ts/webhook
npm pkg set "version=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-protocol=$VERSION"
npm pkg set "dependencies.@drakkar.software/starfish-keyring=$VERSION"
- name: Publish starfish-webhook
working-directory: packages/ts/webhook
run: npx npm@latest publish --provenance --access public --tag ${{ needs.setup.outputs.npm_tag }}