Skip to content

Merge pull request #108 from Ontos-AI/feat/wangbinqi/v2-page-memory-api #41

Merge pull request #108 from Ontos-AI/feat/wangbinqi/v2-page-memory-api

Merge pull request #108 from Ontos-AI/feat/wangbinqi/v2-page-memory-api #41

Workflow file for this run

name: Release Management
on:
push:
branches:
- main
workflow_dispatch:
inputs:
ref:
description: Git ref to publish from
required: true
default: main
type: string
tag:
description: npm dist-tag for the beta publish
required: true
default: beta
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
jobs:
prepare-release:
if: github.event_name == 'push'
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22.14.0
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org
- name: Update npm for trusted publishing support
run: npm install --global npm@^11.5.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm run format:check:all
- name: Typecheck
run: pnpm run typecheck:all
- name: Lint
run: pnpm run lint:all
- name: Run tests
run: pnpm run test:all
- name: Build
run: pnpm run build:all
- name: Create release pull request or publish
uses: changesets/action@v1
with:
commit: Release package
createGithubReleases: false
publish: pnpm run release:publish
title: Release package
version: pnpm run release:version
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
publish-beta:
if: github.event_name == 'workflow_dispatch'
permissions:
contents: write
id-token: write
pull-requests: read
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ inputs.ref }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22.14.0
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
registry-url: https://registry.npmjs.org
- name: Update npm for trusted publishing support
run: npm install --global npm@^11.5.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check formatting
run: pnpm run format:check:all
- name: Typecheck
run: pnpm run typecheck:all
- name: Lint
run: pnpm run lint:all
- name: Run tests
run: pnpm run test:all
- name: Build
run: pnpm run build:all
- name: Publish beta snapshot
env:
BETA_DIST_TAG: ${{ inputs.tag }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm run release:beta