This repository was archived by the owner on Mar 28, 2025. It is now read-only.
version bump #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_message: | ||
type: string | ||
description: Release message | ||
required: true | ||
prerelease: | ||
type: boolean | ||
description: Is this a pre-release version? | ||
required: false | ||
default: false | ||
permissions: | ||
contents: write | ||
jobs: | ||
publish: | ||
name: Publish Langchain Retriever to npm | ||
runs-on: ubuntu-latest | ||
needs: | ||
- create-release | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- run: npm ci | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
package: packages/langchain | ||
token: ${{ secrets.NPM_TOKEN }} | ||
publish: | ||
name: Publish TypeScript Client to npm | ||
runs-on: ubuntu-latest | ||
needs: | ||
- create-release | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: "20" | ||
- run: npm ci | ||
- uses: JS-DevTools/npm-publish@v3 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
create-release: | ||
name: Create GitHub Release | ||
runs-on: ubuntu-latest | ||
needs: | ||
- extract-version | ||
steps: | ||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: "v${{ needs.extract-version.outputs.version }}" | ||
prerelease: ${{ github.event.inputs.prerelease }} | ||
body: ${{ github.event.inputs.release_message }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
extract-version: | ||
name: Extract Version Number | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version_extraction.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- id: version_extraction | ||
run: echo "version=$(cat package.json | jq .version' | xargs)" >> "$GITHUB_OUTPUT" | ||