Skip to content

Commit 5fab64a

Browse files
chore: added changelog generation (#641)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
1 parent cac53b0 commit 5fab64a

File tree

5 files changed

+593
-6
lines changed

5 files changed

+593
-6
lines changed

.github/workflows/auto-release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,40 @@ jobs:
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737

38+
generate-changelog:
39+
if: ${{ needs.semantic-version.outputs.release-tag }}
40+
needs: semantic-version
41+
name: Generate Changelog
42+
runs-on: ubuntu-latest
43+
environment: auto-release
44+
permissions:
45+
contents: write
46+
steps:
47+
- uses: actions/checkout@v4
48+
with:
49+
fetch-depth: 0
50+
51+
- name: Setup backend
52+
uses: ./.github/actions/setup-environment
53+
54+
- name: Generate changelog
55+
env:
56+
OPEN_AI_TOKEN: ${{ secrets.OPEN_AI_TOKEN }}
57+
run: uv run python src/codegen/gscli/cli.py generate changelog --openai-key ${{ secrets.OPEN_AI_TOKEN }}
58+
59+
- name: Commit changes
60+
run: |
61+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
62+
git config --local user.name "github-actions[bot]"
63+
git add docs/changelog/changelog.mdx
64+
git diff --staged --quiet || git commit -m "update changelog"
65+
66+
- name: Push changes
67+
uses: ad-m/github-push-action@master
68+
with:
69+
github_token: ${{ secrets.GITHUB_TOKEN }}
70+
branch: ${{ github.ref }}
71+
3872
release:
3973
if: ${{ needs.semantic-version.outputs.release-tag }}
4074
needs: semantic-version

.github/workflows/generate-docs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Generate Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
permissions:
9+
contents: write # Need write permission to commit changes
10+
11+
jobs:
12+
generate-docs:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup backend
20+
uses: ./.github/actions/setup-environment
21+
22+
- name: Generate API reference
23+
run: uv run python src/codegen/gscli/cli.py generate docs
24+
25+
- name: Commit changes
26+
run: |
27+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
28+
git config --local user.name "github-actions[bot]"
29+
git add docs/
30+
git diff --staged --quiet || git commit -m "docs: updated API reference"
31+
32+
- name: Push changes
33+
uses: ad-m/github-push-action@master
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
branch: ${{ github.ref }}

0 commit comments

Comments
 (0)