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
89 changes: 89 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Publish to npm

on:
workflow_dispatch:
inputs:
package:
description: Package to publish.
type: choice
options:
- react-native-rag
- '@react-native-rag/executorch'
- '@react-native-rag/op-sqlite'
required: true
release-type:
description: Type of release to publish.
type: choice
options: [stable, nightly, beta, alpha, rc]
default: stable
version:
description: Explicit version in x.y.z format (leave empty to infer automatically).
type: string
required: false
default: ''
perform-git-operations:
description: Create and push the release commit + tag.
type: boolean
default: false
dry-run:
description: Dry run — no actual publish or git push.
type: boolean
default: true

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: write
id-token: write

concurrency:
group: publish-${{ inputs.package }}-${{ github.ref }}
cancel-in-progress: false

steps:
- name: Check out
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: https://registry.npmjs.org/

- name: Publish react-native-rag
if: ${{ inputs.package == 'react-native-rag' }}
uses: software-mansion/npm-package-publish@22b6e632b4310c5c061a047bccc99d0cea88d2bb
with:
package-name: 'react-native-rag'
package-json-path: 'package.json'
install-dependencies-command: 'yarn install --immutable'
release-type: ${{ inputs.release-type }}
version: ${{ inputs.version }}
perform-git-operations: ${{ inputs.perform-git-operations }}
dry-run: ${{ inputs.dry-run }}

- name: Publish @react-native-rag/executorch
if: ${{ inputs.package == '@react-native-rag/executorch' }}
uses: software-mansion/npm-package-publish@22b6e632b4310c5c061a047bccc99d0cea88d2bb
with:
package-name: '@react-native-rag/executorch'
package-json-path: 'packages/executorch/package.json'
install-dependencies-command: 'yarn install --immutable'
release-type: ${{ inputs.release-type }}
version: ${{ inputs.version }}
perform-git-operations: ${{ inputs.perform-git-operations }}
dry-run: ${{ inputs.dry-run }}

- name: Publish @react-native-rag/op-sqlite
if: ${{ inputs.package == '@react-native-rag/op-sqlite' }}
uses: software-mansion/npm-package-publish@22b6e632b4310c5c061a047bccc99d0cea88d2bb
with:
package-name: '@react-native-rag/op-sqlite'
package-json-path: 'packages/op-sqlite/package.json'
install-dependencies-command: 'yarn install --immutable'
release-type: ${{ inputs.release-type }}
version: ${{ inputs.version }}
perform-git-operations: ${{ inputs.perform-git-operations }}
dry-run: ${{ inputs.dry-run }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
},
"homepage": "https://github.com/software-mansion-labs/react-native-rag#readme",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/executorch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
},
"license": "MIT",
"description": "React Native ExecuTorch wrapper for React Native RAG",
"repository": {
"type": "git",
"url": "git+https://github.com/software-mansion-labs/react-native-rag.git",
"directory": "packages/executorch"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"peerDependencies": {
"react-native-executorch": "^0.8.0",
"react-native-rag": "^0.8.0"
Expand Down
9 changes: 9 additions & 0 deletions packages/op-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
},
"license": "MIT",
"description": "OP-SQLite wrapper for React Native RAG",
"repository": {
"type": "git",
"url": "git+https://github.com/software-mansion-labs/react-native-rag.git",
"directory": "packages/op-sqlite"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"peerDependencies": {
"@op-engineering/op-sqlite": "^15.2.7",
"react-native-rag": "^0.8.0"
Expand Down
Loading