LibreChat/.github/workflows/data-provider.yml
Marco Beretta 9e6d677751
⚙️ ci: Bump GitHub Actions to Node.js 24 Runtimes (#14689)
* ci: bump GitHub Actions to Node.js 24 runtimes

Clear Node 20 deprecation warnings on runners by moving workflow
actions to majors that declare node24 (checkout, cache, setup-node,
artifacts, Docker buildx/build-push/qemu/login, github-script,
setup-go, Azure login/helm, create-pull-request, axe-linter).

* fix: release leader lock via ioredis on Redis Cluster

@keyv/redis EVAL can surface unhandled MOVED redirects on cluster,
so resign() logged failure and left LeadingServerUUID set. Use ioredis
for leader election SET NX / GET / Lua (same pattern as principals and
concurrency locks) so cluster redirects are retried and resignation
clears the lock.
2026-08-07 11:25:29 -04:00

67 lines
1.8 KiB
YAML

name: Publish `librechat-data-provider` to NPM
on:
push:
branches:
- main
paths:
- 'packages/data-provider/package.json'
workflow_dispatch:
inputs:
reason:
description: 'Reason for manual trigger'
required: false
default: 'Manual publish requested'
permissions:
contents: read
jobs:
pack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '24.16.0'
- run: cd packages/data-provider && npm ci
- run: cd packages/data-provider && npm run build
- name: Pack package
run: |
mkdir -p npm-package
cd packages/data-provider
npm pack --pack-destination "$GITHUB_WORKSPACE/npm-package"
- name: Upload package
uses: actions/upload-artifact@v6
with:
name: librechat-data-provider-package
path: npm-package/*.tgz
if-no-files-found: error
retention-days: 2
publish-npm:
needs: pack
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment: publish # Must match npm trusted publisher config
permissions:
contents: read
id-token: write # Required for OIDC trusted publishing
steps:
- uses: actions/setup-node@v5
with:
node-version: '24.16.0'
registry-url: 'https://registry.npmjs.org'
- name: Install npm with OIDC support
run: npm install -g npm@11.14.1 --ignore-scripts
- name: Download package
uses: actions/download-artifact@v7
with:
name: librechat-data-provider-package
path: npm-package
- name: Publish package
working-directory: npm-package
run: npm publish *.tgz --provenance