feat: add IP allowlisting, rate limiting, CORS, config file, and requ… #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |