Skip to content

Commit

Permalink
chore: add changelog action
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Nov 25, 2024
1 parent 7883d0f commit 81b1231
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Update Changelog After Release

# 触发条件:每次创建 Release 后触发
on:
release:
types:
- published

jobs:
update-changelog:
name: Update Changelog
runs-on: ubuntu-latest
steps:
# 1. 检出代码
- name: Checkout repository
uses: actions/checkout@v3

# 2. 获取 Release Notes
- name: Fetch Release Notes
id: get_release_notes
uses: actions/github-script@v6
with:
script: |
const release = context.payload.release;
const tagName = release.tag_name;
const releaseNotes = release.body || "No release notes provided.";
return {
tagName,
releaseNotes,
};
# 输出 Release Notes 和 Tag 名
outputs:
tag: ${{ steps.get_release_notes.outputs.tagName }}
notes: ${{ steps.get_release_notes.outputs.releaseNotes }}

# 3. 更新 CHANGELOG.md 文件
- name: Update CHANGELOG.md
run: |
# 如果 CHANGELOG.md 文件不存在,创建一个新的
if [ ! -f CHANGELOG.md ]; then
echo "# Changelog" > CHANGELOG.md
fi
# 创建临时文件,将新内容写到最前面
{
echo "## Release ${{ steps.get_release_notes.outputs.tag }} - $(date +"%Y-%m-%d")"
echo ""
echo "${{ steps.get_release_notes.outputs.notes }}"
echo ""
cat CHANGELOG.md
} > TEMP_CHANGELOG.md
# 覆盖原文件
mv TEMP_CHANGELOG.md CHANGELOG.md
# 4. 提交变更到仓库
- name: Commit and push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add CHANGELOG.md
git commit -m "docs: update CHANGELOG.md for release ${{ steps.get_release_notes.outputs.tag }}"
git push
60 changes: 60 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Release 0.3.1

## What's Changed

- Fix GA script by @BroKun in https://github.com/difizen/libro/pull/307
- fix type annotation by @BroKun in https://github.com/difizen/libro/pull/308
- feat(docs): refactory navigation and add mobile docs by @huxiamei in https://github.com/difizen/libro/pull/310
- docs: add updates by @sunshinesmilelk in https://github.com/difizen/libro/pull/312
- chore: update contributing doc&add welcome action by @sunshinesmilelk in https://github.com/difizen/libro/pull/315
- chore: add pr label status action by @sunshinesmilelk in https://github.com/difizen/libro/pull/317
- fix: use bot token in "pr-label-status.yml" workflow by @bubkoo in https://github.com/difizen/libro/pull/318
- docs: full-fill the "Quick Start" section by @bubkoo in https://github.com/difizen/libro/pull/316
- chore: automatically add labels based on branch name by @sunshinesmilelk in https://github.com/difizen/libro/pull/320
- chore: add discord release action by @sunshinesmilelk in https://github.com/difizen/libro/pull/322
- fix: pr label by title action by @sunshinesmilelk in https://github.com/difizen/libro/pull/324
- docs: update discord link by @BroKun in https://github.com/difizen/libro/pull/323
- fix: pr label action by @sunshinesmilelk in https://github.com/difizen/libro/pull/328
- fix: improve markdown pre style& add libro guide notebook by @sunshinesmilelk in https://github.com/difizen/libro/pull/327
- docs: add code of conduct by @sunshinesmilelk in https://github.com/difizen/libro/pull/330
- docs: update readme by @sunshinesmilelk in https://github.com/difizen/libro/pull/332
- chore: release by @difizor in https://github.com/difizen/libro/pull/331

**Full Changelog**: https://github.com/difizen/libro/compare/0.3.0...0.3.1

# Release 0.3.0

## New Features

### AI Auto-Completion ✨

We've enhanced the AI programming assistant by adding AI-powered auto-completion. While writing code in a cell, the assistant will automatically provide context-based code suggestions, and you can press the Tab key to accept them, boosting your development speed.

<img src="https://raw.githubusercontent.com/wiki/difizen/libro/assets/ai_completion.gif" alt="alt text" width="1000" >

### Report Preview 📝

A new report preview feature has been added, allowing notebook content to be visually presented as a report. With a clean and concise layout, it supports multiple scenarios like data analysis and result presentation.

<img src="https://raw.githubusercontent.com/wiki/difizen/libro/assets/report.gif" alt="alt text" width="1000" >

### Support for Julia and R Script Editing and Preview

<img src="https://raw.githubusercontent.com/wiki/difizen/libro/assets/r.png" alt="alt text" width="1000" >

<img src="https://raw.githubusercontent.com/wiki/difizen/libro/assets/julia.png" alt="alt text" width="1000" >

## What's Changed

- feat: ai inline completion by @coetzeexu in https://github.com/difizen/libro/pull/294
- feat: add app or report format for libro by @sunshinesmilelk in https://github.com/difizen/libro/pull/301
- feat: deploy plugin by @BroKun in https://github.com/difizen/libro/pull/299
- fix: set markdown style #302 by @sunshinesmilelk in https://github.com/difizen/libro/pull/303
- feat(prompt): configurable prompt cell module by @sunshinesmilelk in https://github.com/difizen/libro/pull/304
- chore: release by @difizen-bot in https://github.com/difizen/libro/pull/305

## New Contributors

- @coetzeexu made their first contribution in https://github.com/difizen/libro/pull/294

**Full Changelog**: https://github.com/difizen/libro/compare/0.2.45...0.3.0

0 comments on commit 81b1231

Please sign in to comment.