Skip to content

Release to NPM - main · @cooleel #3

Release to NPM - main · @cooleel

Release to NPM - main · @cooleel #3

Workflow file for this run

name: Release to NPM
run-name: "Release to NPM - ${{ github.ref_name }} · @${{ github.actor }}"
on:
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
jobs:
build-and-test:
name: Build SDK and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Type check
run: npm run type-check
- name: Build
run: npm run build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sdk-dist
path: dist
publish:
name: Publish to npm
needs:
- build-and-test
runs-on: ubuntu-latest
environment:
name: npm
url: https://www.npmjs.com/package/tensorlake-opencode
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: sdk-dist
path: dist
- name: Verify package contents
run: npm pack --dry-run --ignore-scripts
- name: Publish to npm
run: npm publish --access public --ignore-scripts