Skip to content

Commit 3a4f592

Browse files
ci: 💚 无法生成Changelog.
1 parent cb4d691 commit 3a4f592

2 files changed

Lines changed: 3 additions & 72 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
run: npm install -g yarn
2121
- name: Install Dependencies
2222
run: yarn
23-
- name: Install conventional-changelog
24-
run: npm install -g conventional-changelog-cli conventional-changelog-angular
2523
- name: Delete Unnecessary Files on Windows
2624
if: matrix.os == 'windows-latest'
2725
run: |
@@ -38,59 +36,6 @@ jobs:
3836
if: matrix.os != 'windows-latest'
3937
run: rm -rf README.md && rm -rf .github && rm -rf .gitignore && rm -rf .gitattributes && rm -rf .vscode && rm -rf readme && rm -rf installer && rm -rf changelog
4038
shell: bash
41-
- name: Generate changelog (Windows)
42-
if: matrix.os == 'windows-latest'
43-
run: |
44-
# 生成 changelog
45-
# 检查是否有标签
46-
$LATEST_TAG = $(git describe --tags $(git rev-list --tags --max-count=1) 2>$null)
47-
Write-Output "Latest tag: $LATEST_TAG"
48-
49-
# 如果没有标签,则使用所有提交
50-
if (-not $LATEST_TAG) {
51-
# 为首次发布创建初始标签
52-
git config --global user.name 'GitHub Action'
53-
git config --global user.email 'action@github.com'
54-
git tag v0.0.0
55-
$LATEST_TAG = "v0.0.0"
56-
}
57-
58-
# 使用自定义脚本生成 changelog
59-
node .github/generate-conventional-changelog.js
60-
61-
# 复制 changelog 到输出目录(如果存在)
62-
if (Test-Path "temp_changelog.md") {
63-
New-Item -ItemType Directory -Force -Path "./out/"
64-
Copy-Item "temp_changelog.md" -Destination "./out/changelog.md"
65-
}
66-
shell: pwsh
67-
- name: Generate changelog (Unix)
68-
if: matrix.os != 'windows-latest'
69-
run: |
70-
# 生成 changelog
71-
# 检查是否有标签
72-
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1) 2>/dev/null)
73-
echo "Latest tag: $LATEST_TAG"
74-
75-
# 如果没有标签,则使用所有提交
76-
if [ -z "$LATEST_TAG" ]; then
77-
# 为首次发布创建初始标签
78-
git config --global user.name 'GitHub Action'
79-
git config --global user.email 'action@github.com'
80-
git tag v0.0.0
81-
LATEST_TAG="v0.0.0"
82-
fi
83-
84-
# 使用自定义脚本生成 changelog
85-
node .github/generate-conventional-changelog.js
86-
87-
# 复制 changelog 到输出目录(如果存在)
88-
if [ -f temp_changelog.md ]; then
89-
mkdir -p ./out/
90-
cp temp_changelog.md ./out/changelog.md
91-
fi
92-
shell: bash
93-
9439
- name: Build with electron-forge
9540
run: "yarn make"
9641
- name: Upload Build Artifacts (Windows)

.github/workflows/release.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ jobs:
9494
9595
- name: Create Release
9696
id: create_release
97-
uses: actions/create-release@v1
97+
uses: softprops/action-gh-release@v1
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100
with:
101101
tag_name: ${{ github.event.inputs.release_version }}
102-
release_name: ${{ github.event.inputs.release_title }}
102+
name: ${{ github.event.inputs.release_title }}
103103
body: |
104104
## Changelog
105105
@@ -111,18 +111,4 @@ jobs:
111111
此版本包含以下文件:
112112
draft: false
113113
prerelease: false
114-
115-
- name: Upload release assets
116-
run: |
117-
# 上传所有release assets
118-
for file in ./release_assets/*; do
119-
if [ -f "$file" ]; then
120-
asset_name=$(basename "$file")
121-
echo "Uploading $asset_name..."
122-
123-
# 使用GitHub CLI上传资产
124-
gh release upload ${{ github.event.inputs.release_version }} "$file" --repo ${{ github.repository }} || echo "Failed to upload $asset_name"
125-
fi
126-
done
127-
env:
128-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114+
files: ./release_assets/*

0 commit comments

Comments
 (0)