Skip to content

feat: always-on inspect server with clean shutdown and port retry #9

feat: always-on inspect server with clean shutdown and port retry

feat: always-on inspect server with clean shutdown and port retry #9

Workflow file for this run

name: npm Release
on:
push:
tags:
- "v*"
permissions:
contents: read
defaults:
run:
working-directory: apps/cli
jobs:
release:
name: Publish to npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.9"
- uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: bun install --frozen-lockfile
working-directory: .
- name: Build all packages
run: bunx turbo run build
working-directory: .
- name: Run tests
run: bunx turbo run test --filter=xpose-dev
working-directory: .
- name: Prepare package for publish
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
node -e "
const pkg = require('./package.json');
pkg.version = '$VERSION';
// Remove workspace deps — they are bundled by tsup
delete pkg.devDependencies['@xpose/protocol'];
delete pkg.devDependencies['@xpose/tunnel-core'];
require('fs').writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n');
"
- name: Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}