-
Notifications
You must be signed in to change notification settings - Fork 16
69 lines (61 loc) · 2.29 KB
/
changelog-generator.yml
File metadata and controls
69 lines (61 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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