Skip to content

Changelog Generator #181

Changelog Generator

Changelog Generator #181

name: Changelog Generator
on:
schedule:
- cron: "0 7 * * *"
workflow_dispatch:
inputs:
dry_run:
description: "Dry run (no branch/PR)"
required: false
default: "false"
debug:
description: "Enable debug logs (DEBUG=changelog*)"
required: false
default: "false"
jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout target worktree
uses: actions/checkout@v4
with:
fetch-depth: 0
path: pr-worktree
token: ${{ secrets.CHANGELOG_PAT }}
- name: Set up mise
uses: jdx/mise-action@v4
with:
cache: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Install openapi-changes
shell: bash
# Fixing to the version used during development in order to avoid breaking changes
run: npm i -g @pb33f/openapi-changes@0.0.80
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Run changelog generator
env:
GITHUB_TOKEN: ${{ secrets.CHANGELOG_PAT }}
CHANGELOG_WORKTREE: pr-worktree
GLEAN_API_TOKEN: ${{ secrets.CHANGELOG_GLEAN_API_TOKEN }}
GLEAN_INSTANCE: ${{ secrets.CHANGELOG_GLEAN_INSTANCE }}
CHANGELOG_SUMMARIZE: ${{ secrets.CHANGELOG_SUMMARIZE }}
DEBUG: ${{ inputs.debug == 'true' && 'changelog*' || '' }}
run: |
if [ "${{ inputs.dry_run }}" = "true" ]; then
mise x -- pnpm changelog:publish --dry-run
else
mise x -- pnpm changelog:publish
fi