Skip to content

Commit b713a89

Browse files
committed
fix: 修复actions无法打包问题[Segmentation fault (core dumped)](PlasmoHQ/plasmo#1156 (comment))
1 parent b790069 commit b713a89

File tree

4 files changed

+22
-8084
lines changed

4 files changed

+22
-8084
lines changed

.github/workflows/submit.yml

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
name: Release Project
22

3-
# on:
4-
# push:
5-
# tags:
6-
# - 'v*' # 当推送以 "v" 开头的标签时触发
73
on:
84
push:
9-
branches:
10-
- master
5+
tags:
6+
- 'v*' # 当推送以 "v" 开头的标签时触发
117

128
jobs:
139
build-and-release:
@@ -28,7 +24,7 @@ jobs:
2824
- name: Install pnpm
2925
run: npm install -g pnpm
3026
- name: Install dependencies
31-
run: pnpm install --frozen-lockfile
27+
run: pnpm install
3228
- name: Build the extension
3329
run: pnpm build
3430
- name: Package the extension into a zip artifact
@@ -39,8 +35,8 @@ jobs:
3935
env:
4036
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4137
with:
42-
tag_name: ${{ github.ref }}
43-
release_name: Release ${{ github.ref }}
38+
tag_name: ${{ github.ref_name }}
39+
release_name: Release ${{ github.ref_name }}
4440
draft: false
4541
prerelease: false
4642

@@ -50,6 +46,6 @@ jobs:
5046
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
5147
with:
5248
upload_url: ${{ steps.create_release.outputs.upload_url }}
53-
asset_path: ./chrome-mv3-prod.zip # 指定文件路径
49+
asset_path: ./build/chrome-mv3-prod.zip # 指定文件路径
5450
asset_name: chrome-mv3-prod.zip
5551
asset_content_type: application/zip

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ dist/
3232
# typescript
3333
.tsbuildinfo
3434

35-
examples
35+
examples
36+
37+
# github action 安装时会冲突,暂时没找到原因,先不提交了
38+
pnpm-lock.yaml

.pnpmfile.cjs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function readPackage(packageJson, context) {
2+
if (['lightningcss'].includes(packageJson.name) && packageJson.optionalDependencies) {
3+
packageJson.optionalDependencies = {}; // 清空 optionalDependencies
4+
}
5+
return packageJson;
6+
}
7+
8+
module.exports = {
9+
hooks: {
10+
readPackage,
11+
},
12+
};

0 commit comments

Comments
 (0)