Skip to content

Commit b831443

Browse files
authored
Merge pull request #3497 from meilisearch/add-changelog
Add changelog with automated update workflow
2 parents 0069bd3 + fa1ca8f commit b831443

5 files changed

Lines changed: 3996 additions & 3 deletions

File tree

.github/workflows/post-deployment.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,45 @@ jobs:
169169
else
170170
echo "No changes in the Mintlify OpenAPI file."
171171
fi
172+
173+
# Runs alongside the OpenAPI automation. A new Meilisearch release triggers both
174+
# the OpenAPI update and the changelog update at the same time.
175+
# Only runs when docs.json has "internal-meili-fetch-automation": true.
176+
update-changelog:
177+
name: Update changelog if new release exists
178+
runs-on: ubuntu-latest
179+
needs: [build-code-samples]
180+
if: needs.build-code-samples.outputs.run_openapi_automation == 'true'
181+
182+
steps:
183+
- name: Checkout repository
184+
uses: actions/checkout@v6
185+
with:
186+
ref: main
187+
token: ${{ secrets.GH_TOKEN }}
188+
189+
- name: Setup Node.js
190+
uses: actions/setup-node@v6
191+
with:
192+
node-version: "20"
193+
cache: "npm"
194+
195+
- name: Install dependencies
196+
run: npm install
197+
198+
- name: Generate changelog
199+
env:
200+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
201+
run: npm run generate-changelog
202+
203+
- name: Commit changes
204+
run: |
205+
if git diff --quiet changelog/; then
206+
echo "No changelog changes detected."
207+
else
208+
git config user.name "meili-bot"
209+
git config user.email "robot@meilisearch.com"
210+
git add changelog/
211+
git commit -m "[AUTOMATION POST DEPLOYMENT] Update changelog with latest Meilisearch release"
212+
git push origin main
213+
fi

0 commit comments

Comments
 (0)