-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 1.11 KB
/
Copy pathpublish.yml
File metadata and controls
31 lines (29 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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: the registry trusts this workflow's OIDC identity, so no token
# is stored anywhere. Requires npm 11.5.1+, which is newer than the version bundled with
# the Node 22 runner, hence the explicit upgrade.
- run: npm install -g npm@latest
- run: npm install
- run: npm test
- run: npm publish --access public