Skip to content

chore: setup .please/ workspace (v7→v10 migration) (#97) #100

chore: setup .please/ workspace (v7→v10 migration) (#97)

chore: setup .please/ workspace (v7→v10 migration) (#97) #100

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: [self-hosted, linux, x64, ubuntu-2404, aws]
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@v1
id: app-token
with:
app-id: ${{ secrets.PF_BOT_APP_ID }}
private-key: ${{ secrets.PF_BOT_PRIVATE_KEY }}
- uses: googleapis/release-please-action@v4
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@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v4
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
- name: Publish to npm
run: |
for dir in npm/code-*; do
(cd "$dir" && npm publish --access public)
done
cd npm/code && npm publish --access public
env:
NPM_CONFIG_PROVENANCE: false