<!-- Canonical: https://nitrozen.io/docs/github-action -->

> Publish Nitrozen.io changelog entries straight from a GitHub Actions workflow — most commonly triggered by a GitHub Release.

[Docs](https://nitrozen.io/docs) / GitHub Action

# GitHub Action

Turn a GitHub Release into a published Nitrozen changelog entry automatically — no API scripting required.

 [ GitHub Marketplace ](https://github.com/marketplace/actions/nitrozen-changelog) [ GitHub ](https://github.com/nitrozenio/changelog-action)

## Quick Start

 Add a workflow that runs whenever you publish a GitHub Release. `title` and `content` default to the release's name/tag and body, so this is a complete integration on its own:

.github/workflows/changelog.yml

```
name: Publish changelog

on:
  release:
    types: [published]

jobs:
  changelog:
    runs-on: ubuntu-latest
    steps:
      - uses: nitrozenio/changelog-action@v1
        with:
          api-key: $<?php echo e(secrets.NITROZEN_API_KEY); ?>

          project-id: '123'
```

 No build step or dependencies to install — the action is a composite action that runs on the Node runtime every GitHub-hosted runner already ships. 

## Authentication

 Create an API token from the [API Tokens](https://nitrozen.io/api-tokens) page and store it as a repository or organization secret — never commit it directly to a workflow file.

shell

```
# Repo → Settings → Secrets and variables → Actions → New repository secret
# Name:  NITROZEN_API_KEY
# Value: <your Nitrozen API token>
```

## Pinning for Security

 The examples on this page use `@v1` for readability, but it's a mutable tag. For any workflow handling secrets — this one takes `NITROZEN_API_KEY` — [GitHub recommends](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions) pinning third-party actions to a full-length commit SHA instead, with the version kept as a trailing comment:

yaml

```
- uses: nitrozenio/changelog-action@<40-char-commit-sha> # v1
```

## Inputs

 | Input | Required | Default | Description |
|---|---|---|---|
| api-key | Yes | — | Nitrozen API token. Store it as a secret, never inline. |
| project-id | Yes | — | Numeric Nitrozen project ID. |
| title | No | Release name/tag | Entry title. Only defaults on `release` events. |
| content | No | Release body | Entry body. Markdown is supported. Only defaults on `release` events. |
| category | No | `new` | Category slug. See valid values below. |
| is-published | No | `true` | Set to `false` to create a draft for manual review instead of publishing immediately. |
| published-at | No | Now | ISO 8601 timestamp. Only applied when `is-published` is `true`. |
| project-slug | No | — | Project slug. Only used to build the `changelog-url` output. |
| api-base-url | No | `https://nitrozen.io/api/v1` | Override for self-hosted or staging instances. |

 Every project starts with these built-in `category` values: `new` `improvement` `fix` `announcement` Projects on a plan with custom categories enabled can define additional category slugs from the dashboard — any of those slugs are valid here too.

## Outputs

 | Output | Description |
|---|---|
| entry-id | ID of the created entry. |
| changelog-url | Public URL of the entry, e.g. `https://nitrozen.io/c/payments-api/61`. Only set when `project-slug` is provided. |

## More Examples

### Explicit title/content, imported as a draft

Useful for release automation where you'd rather review the wording before it goes live.

yaml

```
- uses: nitrozenio/changelog-action@v1
  with:
    api-key: $<?php echo e(secrets.NITROZEN_API_KEY); ?>

    project-id: '123'
    title: 'API v2.4.0'
    content: |
      - Added SSO authentication
      - Fixed webhook retry bug
    category: 'new'
    is-published: 'false'
```

### Comment the published URL back on the release

yaml

```
- uses: nitrozenio/changelog-action@v1
  id: nitrozen
  with:
    api-key: $<?php echo e(secrets.NITROZEN_API_KEY); ?>

    project-id: '123'
    project-slug: 'payments-api'

- run: echo "Published to $<?php echo e(steps.nitrozen.outputs.changelog-url); ?>"
```
