mirror of
https://github.com/fankes/komari-theme-purcarte.git
synced 2025-10-19 03:49:22 +08:00
feat: 添加生成变更日志功能
This commit is contained in:
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@@ -91,6 +91,16 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ASSET_NAME=$(ls *.zip)
|
ASSET_NAME=$(ls *.zip)
|
||||||
echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_ENV
|
echo "ASSET_NAME=${ASSET_NAME}" >> $GITHUB_ENV
|
||||||
|
- name: Generate Changelog
|
||||||
|
id: changelog
|
||||||
|
run: |
|
||||||
|
git fetch --prune --unshallow
|
||||||
|
PREVIOUS_TAG=$(git describe --tags --abbrev=0 `git rev-list --tags --skip=1 --max-count=1` 2>/dev/null || git rev-list --max-parents=0 HEAD)
|
||||||
|
echo "Previous tag: $PREVIOUS_TAG"
|
||||||
|
CHANGELOG=$(git log $PREVIOUS_TAG..${{ github.ref_name }} --pretty=format:"* %s (%h)")
|
||||||
|
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
|
||||||
|
echo "$CHANGELOG" >> $GITHUB_ENV
|
||||||
|
echo "EOF" >> $GITHUB_ENV
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
@@ -99,7 +109,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref }}
|
||||||
release_name: Release ${{ github.ref_name }}
|
release_name: Release ${{ github.ref_name }}
|
||||||
body: "Automated release for tag ${{ github.ref_name }}"
|
body: ${{ env.CHANGELOG }}
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "Komari Theme PurCarte",
|
"name": "Komari Theme PurCarte",
|
||||||
"short": "PurCarte",
|
"short": "PurCarte",
|
||||||
"description": "A frosted glass theme for Komari",
|
"description": "A frosted glass theme for Komari",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"author": "Montia & Gemini",
|
"author": "Montia & Gemini",
|
||||||
"url": "https://github.com/Montia37/Komari-theme-purcarte",
|
"url": "https://github.com/Montia37/Komari-theme-purcarte",
|
||||||
"preview": "preview.png"
|
"preview": "preview.png"
|
||||||
|
Reference in New Issue
Block a user