Skip to content

fix: make warehouseId optional in ServiceContext when no plugin requi… #86

fix: make warehouseId optional in ServiceContext when no plugin requi…

fix: make warehouseId optional in ServiceContext when no plugin requi… #86

Workflow file for this run

name: Release
on:
push:
branches:
- main
paths-ignore:
- 'packages/lakebase/**'
workflow_dispatch:
inputs:
dry-run:
description: "Dry run (no actual release)"
required: false
type: boolean
default: false
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
environment: release
outputs:
version: ${{ steps.version.outputs.version }}
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Determine release mode
id: mode
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "dry_run=false" >> $GITHUB_OUTPUT
else
echo "dry_run=${{ inputs.dry-run }}" >> $GITHUB_OUTPUT
fi
- name: Determine version
id: version
if: steps.mode.outputs.dry_run != 'true'
run: |
VERSION=$(pnpm exec release-it --release-version --ci 2>/dev/null) || true
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Next version: $VERSION"
else
echo "No releasable version detected"
fi
- name: Release
run: |
if [ "${{ steps.mode.outputs.dry_run }}" == "true" ]; then
pnpm release:dry
else
pnpm release:ci
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
sync-template:
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
needs: release
# in case a dry run is performed, the version is not set so we need to check for it.
if: needs.release.outputs.version != ''
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Sync template and push tag
run: pnpm exec tsx tools/publish-template-tag.ts ${{ needs.release.outputs.version }}