Skip to content

Regenerate from the customer API contract #1

Regenerate from the customer API contract

Regenerate from the customer API contract #1

Workflow file for this run

# GENERATED. Publishes @searchcode/cli when a version tag is pushed.
#
# A tag only reaches this repository from the private source repository, and it only pushes one
# after the live smoke test has passed against the production API. That smoke test is the gate
# that proves these clients match the API they describe; the tests below are the offline,
# structural half. See scripts/smoke-public-clients.mjs in the source repository.
name: publish
on:
push:
tags: ['v*']
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'
# npm Trusted Publishing authenticates this workflow by its OIDC identity, so no token is
# needed. It cannot be used for a package's FIRST publish: a trusted publisher is configured
# on the package's settings page, which does not exist until the package has been published
# once. NPM_TOKEN covers that first release only; once trusted publishing is registered the
# secret is deleted and this falls back to OIDC automatically.
# Requires npm 11.5.1+, newer than the version bundled with the Node 22 runner.
- run: npm install -g npm@latest
- run: npm install
- run: npm test
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}