Guides

Publish from CI

Post release notes from GitHub Actions with a workspace key.

  1. Create a workspace key

    In Tracee, open Settings → Workspace keys and create one named "GitHub Actions". Add it to your repository's secrets as TRACEE_API_KEY.

  2. Add a step

    .github/workflows/release.yml
    on:
      release:
        types: [published]
    
    jobs:
      announce:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/setup-node@v4
            with:
              node-version: 22
          - run: npm install -g https://traceeai.com/cli/tracee-cli.tgz
          - run: |
              tracee posts create \
                --body "${{ github.event.release.name }} is out: ${{ github.event.release.html_url }}" \
                --channel linkedin --channel x \
                --publish now
            env:
              TRACEE_API_KEY: ${{ secrets.TRACEE_API_KEY }}

The post shows in Tracee as API · GitHub Actions. If the workspace requires approval, it waits for a person, and the step still succeeds.