|
23 | 23 | steps: |
24 | 24 | - name: Checkout repository |
25 | 25 | uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + fetch-depth: 0 # Fetch all history for changelog |
| 28 | + |
| 29 | + - name: Get commit messages since last tag |
| 30 | + id: changelog |
| 31 | + run: | |
| 32 | + # Get the last tag |
| 33 | + LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") |
| 34 | + |
| 35 | + if [ -z "$LAST_TAG" ]; then |
| 36 | + # No previous tag, get all commits |
| 37 | + COMMITS=$(git log --pretty=format:"- %s" -20) |
| 38 | + else |
| 39 | + # Get commits since last tag |
| 40 | + COMMITS=$(git log ${LAST_TAG}..HEAD --pretty=format:"- %s") |
| 41 | + fi |
| 42 | + |
| 43 | + # Handle empty commits |
| 44 | + if [ -z "$COMMITS" ]; then |
| 45 | + COMMITS="- Initial release" |
| 46 | + fi |
| 47 | + |
| 48 | + # Save to output (handle multiline) |
| 49 | + echo "commits<<EOF" >> $GITHUB_OUTPUT |
| 50 | + echo "$COMMITS" >> $GITHUB_OUTPUT |
| 51 | + echo "EOF" >> $GITHUB_OUTPUT |
| 52 | + shell: bash |
26 | 53 |
|
27 | 54 | - name: Setup Node.js |
28 | 55 | uses: actions/setup-node@v4 |
@@ -61,18 +88,26 @@ jobs: |
61 | 88 | tagName: v${{ github.run_number }} |
62 | 89 | releaseName: 'LoArchive v${{ github.run_number }}' |
63 | 90 | releaseBody: | |
64 | | - ## 更新内容 |
| 91 | + ## 🚀 LoArchive v${{ github.run_number }} |
| 92 | + |
| 93 | + ### 📝 更新内容 |
| 94 | + ${{ steps.changelog.outputs.commits }} |
65 | 95 | |
66 | | - 提交: ${{ github.sha }} |
| 96 | + --- |
67 | 97 | |
68 | | - ### 下载说明 |
69 | | - - **Windows**: 下载 `.msi` 或 `.exe` 安装包 |
| 98 | + ### 📥 下载说明 |
| 99 | + | 文件 | 说明 | |
| 100 | + |------|------| |
| 101 | + | `.msi` | Windows 安装包(推荐) | |
| 102 | + | `.exe` | Windows 便携版 | |
70 | 103 | |
71 | | - ### 使用方法 |
| 104 | + ### 🔧 使用方法 |
72 | 105 | 1. 下载并安装 |
73 | 106 | 2. 打开应用 |
74 | | - 3. 在设置中配置 Lofter 登录信息 |
| 107 | + 3. 在「设置」中配置 Lofter 登录信息 |
75 | 108 | 4. 开始使用! |
| 109 | + |
| 110 | + --- |
| 111 | + <sub>构建时间: ${{ github.event.head_commit.timestamp }}</sub> |
76 | 112 | releaseDraft: false |
77 | 113 | prerelease: false |
78 | | - |
|
0 commit comments