Skip to content

Commit 0fdab5c

Browse files
committed
fixed(ci):fixed release build bugs
chore: release v4.0.5
1 parent 0dcf61c commit 0fdab5c

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/build_release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,26 @@ jobs:
140140
fetch-depth: 0
141141
submodules: recursive
142142

143+
- name: Setup CI Bot
144+
if: github.event_name == 'workflow_dispatch'
145+
working-directory: ./lite
146+
run: |
147+
git config user.name "The OpenList Bot"
148+
git config user.email "[email protected]"
149+
150+
- name: Update package.json and commit
151+
if: github.event_name == 'workflow_dispatch'
152+
working-directory: ./lite
153+
run: |
154+
jq --arg version "${{ steps.semver.outputs.version }}" '.version = $version' package.json > package.json.tmp && mv package.json.tmp package.json
155+
git add package.json
156+
git commit -S -m "chore: release v${{ steps.semver.outputs.version }}" --no-verify
157+
git push
158+
143159
- name: Build Lite Release
144160
run: |
161+
rm -rf .git
162+
cp -r ../.git .git
145163
chmod +x build.sh
146164
./build.sh --release --compress --lite
147165
working-directory: ./lite
@@ -170,7 +188,7 @@ jobs:
170188
rm -f lite/dist/openlist-frontend-dist-lite-v*.tar.gz
171189
# Copy the lite version
172190
mkdir dist/lite
173-
cp lite/dist/* dist/lite/
191+
cp -r lite/dist/. dist/lite/
174192
175193
if ! jq -e '.name and .version' package.json > /dev/null; then
176194
echo "Error: Invalid package.json"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openlist-frontend/openlist-frontend",
3-
"version": "4.0.4",
3+
"version": "4.0.5",
44
"author": {
55
"name": "The OpenList Projects Contributors",
66
"url": "https://github.com/OpenListTeam"

0 commit comments

Comments
 (0)