fix: update Node.js version to 22 and streamline artifact handling in workflow
This commit is contained in:
parent
4da11d60d4
commit
90a5b84c67
|
@ -20,19 +20,24 @@ jobs:
|
||||||
- name: 设置 Node.js
|
- name: 设置 Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '22'
|
||||||
|
|
||||||
- name: 安装依赖
|
- name: 安装依赖
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: 构建扩展程序
|
- name: 构建扩展程序
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: 将工件压缩成 ZIP
|
||||||
|
run: |-
|
||||||
|
mkdir -p dist
|
||||||
|
cp -r dist/* dist/manifest.json
|
||||||
|
zip -r dist/artifact-${{ gitea.sha }}.zip dist/
|
||||||
|
|
||||||
- name: 上传工件
|
- name: 上传工件
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-${{ gitea.sha }}
|
name: artifact-${{ gitea.sha }}.zip
|
||||||
path: dist/
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: 发布至 Chrome 应用商店
|
name: 发布至 Chrome 应用商店
|
||||||
|
@ -41,11 +46,10 @@ jobs:
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: 下载构建工件
|
- name: 下载构建工件
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-${{ gitea.sha }}
|
name: artifact-${{ gitea.sha }}.zip
|
||||||
|
|
||||||
- uses: actions/setup-node@v2-beta
|
- uses: actions/setup-node@v2-beta
|
||||||
name: 设置 Node.js
|
name: 设置 Node.js
|
||||||
|
|
Loading…
Reference in New Issue
Block a user