diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml new file mode 100644 index 0000000..957a11e --- /dev/null +++ b/.github/workflows/publish-packages.yml @@ -0,0 +1,24 @@ +name: Publish Package to npmjs +on: + push: + branches: + - main + workflow_dispatch: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://npm.pkg.github.com/" + - run: cp .npmrc ./javascript/.npmrc + - run: npm ci + - run: npm run build + working-directory: javascript + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + working-directory: javascript diff --git a/javascript/package.json b/javascript/package.json index 3731ef0..341d052 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "type": "module", - "name": "@hoangvvo/llm-sdk", + "name": "@firefliesai/llm-sdk", "version": "0.1.5", "description": "A unified LLM SDK", "scripts": { diff --git a/package-lock.json b/package-lock.json index 8d6df04..3535c18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,10 @@ { - "name": "llm", + "name": "llm-sdk", "lockfileVersion": 3, "requires": true, "packages": { "": { + "name": "llm-sdk", "workspaces": [ "javascript" ], @@ -39,7 +40,7 @@ } }, "javascript": { - "name": "@hoangvvo/llm-sdk", + "name": "@firefliesai/llm-sdk", "version": "0.1.5", "license": "MIT" }, @@ -1523,6 +1524,10 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@firefliesai/llm-sdk": { + "resolved": "javascript", + "link": true + }, "node_modules/@google/generative-ai": { "version": "0.21.0", "resolved": "https://registry.npmjs.org/@google/generative-ai/-/generative-ai-0.21.0.tgz", @@ -1565,10 +1570,6 @@ "node": ">=18" } }, - "node_modules/@hoangvvo/llm-sdk": { - "resolved": "javascript", - "link": true - }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", diff --git a/package.json b/package.json index 8087386..7dd9e61 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,5 @@ { + "name": "llm-sdk", "type": "module", "workspaces": [ "javascript"