Skip to content

feat(lsp): add native TypeScript 7 (typescript-go) LSP support (#120) #113

feat(lsp): add native TypeScript 7 (typescript-go) LSP support (#120)

feat(lsp): add native TypeScript 7 (typescript-go) LSP support (#120) #113

name: Release Please
on:
push:
branches:
- main
workflow_dispatch:
inputs:
publish_only:
description: Skip release-please and publish directly
required: false
default: false
type: boolean
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
release-please:
if: ${{ !inputs.publish_only }}
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
id: app-token
with:
# client-id is the recommended input (supersedes the legacy app-id).
# client-id is a public identifier -> repo/org variable; only the key is secret.
client-id: ${{ vars.RELEASE_GITHUB_APP_CLIENT_ID }}
private-key: ${{ secrets.RELEASE_GITHUB_APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1
id: release
with:
token: ${{ steps.app-token.outputs.token }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
publish:
needs: release-please
if: ${{ always() && (needs.release-please.outputs.release_created == 'true' || inputs.publish_only) }}
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
- name: Install dependencies
run: bun install
- name: Build npm packages
run: bun run build:npm
# Trusted publishing (OIDC) needs npm >= 11.5.1; setup-node's bundled npm may be older.
- name: Upgrade npm for trusted publishing
run: npm install -g npm@latest
# No NODE_AUTH_TOKEN: npm detects the GitHub Actions OIDC environment (id-token: write)
# and authenticates via the per-package Trusted Publisher configured on npmjs.com.
# Provenance is generated automatically for trusted publishing.
# Idempotent: skip versions already on npm so a re-run (e.g. after a
# partial publish) only pushes the packages still missing, instead of
# aborting on the first "cannot publish over previous version".
- name: Publish to npm
run: |
set -euo pipefail
publish_if_new() {
local dir="$1" name ver
name=$(cd "$dir" && node -p "require('./package.json').name")
ver=$(cd "$dir" && node -p "require('./package.json').version")
if npm view "$name@$ver" version >/dev/null 2>&1; then
echo "== skip $name@$ver (already published)"
else
echo "== publish $name@$ver"
(cd "$dir" && npm publish --access public)
fi
}
for dir in npm/code-*; do publish_if_new "$dir"; done
publish_if_new npm/code