Skip to content

Commit

Permalink
[BLD] Fix for JS package in GH (#2345)
Browse files Browse the repository at this point in the history
  • Loading branch information
tazarov committed Jun 19, 2024
1 parent 8be43ae commit d22bc76
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release-javascript-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@ jobs:
with:
node-version: "16.x"
registry-url: ${{ matrix.registry }}
check-latest: false
token: ${{ matrix.registry == 'https://registry.npmjs.org' && secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: npm install
working-directory: ./clients/js/
- name: Update package.json with organization scope
if: matrix.registry == 'https://npm.pkg.github.com'
run: |
# needed to publish to GitHub packages only
ORG_NAME="@chroma-core"
PACKAGE_NAME=$(jq -r '.name' package.json)
jq --arg org "$ORG_NAME" --arg name "$PACKAGE_NAME" '.name = "\($org)/\($name)"' package.json > tmp.$$.json && mv tmp.$$.json package.json
working-directory: ./clients/js/
- name: Test & publish
run: npm run db:run && PORT=8001 npm run $NPM_SCRIPT
working-directory: ./clients/js/
Expand Down

0 comments on commit d22bc76

Please sign in to comment.