Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish

# Publishes the package to npm when a GitHub Release is published.
# Requires an NPM_TOKEN repo secret (npm automation token with publish rights).

on:
release:
types: [published]
workflow_dispatch:

permissions:
contents: read
id-token: write # for npm provenance

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm build

- name: Publish to npm
run: pnpm publish --no-git-checks --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ to clear the token.

## API reference

Every Lichess endpoint is exposed as a named function (`accountMe`,
`apiUsersStatus`, `challengeCreate`, …), fully typed with inline docs from the
spec. See the [Lichess API documentation](https://lichess.org/api) for endpoint
details.
Every Lichess endpoint is exposed as a named function. The name is the
operation's `operationId` from the spec (e.g. `accountMe`, `apiUsersStatus`,
`challengeCreate`), and each function carries the endpoint's summary and
description as JSDoc.

For a full, searchable index of every generated function and its types, see
[`src/client/sdk.gen.ts`](./src/client/sdk.gen.ts).

## How it stays current

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "equine",
"version": "1.0.0-alpha.0",
"version": "0.3.0",
"description": "Minimal Lichess API Client for Node.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
Loading