# Publish package

<figure><img src="/files/phOqyIiKbklQTpQi6Q8A" alt="" width="200"><figcaption><p>exile.watch logo</p></figcaption></figure>

{% hint style="info" %}
This page covers [`publish-package*`](https://github.com/exile-watch/doryani/blob/main/publish-package/action.yml) actions
{% endhint %}

## Usage

1. Update `package.json` with following script:

```json
// {root}/package.json
{
  "release": "voidstone"
}
```

2. Update `publish-package.yaml` workflow:

```yaml
# {root}/.github/workflows/publish-package.yaml
name: "Publish package: @exile-watch / doryani"

on:
  push:
    paths:
      - 'packages/**'
      - '!packages/**/*.md'
    branches:
      - main

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  contents: write
  pull-requests: write
  issues: write
  packages: write

jobs:
  code-quality-assurance:
    if: "!contains(github.event.head_commit.message, '[skip ci]')"
    runs-on: ubuntu-latest
    name: Code quality assurance
    steps:
      - uses: exile-watch/doryani/code-quality-assurance@main
        with:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

  publish-package:
    needs: [code-quality-assurance]
    name: Publish to NPM
    runs-on: ubuntu-latest
    steps:
      - name: Authenticate to GitHub Registry
        uses: exile-watch/doryani/auth-github-registry@main
        with:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

      - name: Install deps
        uses: exile-watch/doryani/install-npm-dependencies@main
        with:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}

      - run: npm run release
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          NODE_AUTH_TOKEN: ${{ secrets.GH_TOKEN }}
          GITHUB_REPOSITORY: ${{ github.repository }}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.exile.watch/projects/doryani/actions/publish-package.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
