Skip to content

Commit b558094

Browse files
committed
chore: 更新 package.json 中的構建腳本,新增 build:action 命令以簡化構建流程;調整 GitHub Actions 工作流程以包含更多檔案類型的上傳
1 parent ca84710 commit b558094

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ jobs:
1818
environment: dev
1919

2020
steps:
21-
- uses: actions/checkout@v4
21+
- name: Checkout
22+
uses: actions/checkout@v4
2223

23-
- uses: actions/setup-python@v5
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
2426
id: py
2527
with:
2628
python-version: '3.11'
2729

28-
- uses: actions/setup-node@v4
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
2932
with: { node-version: 20, cache: yarn }
3033

3134
- name: Enable corepack
@@ -42,17 +45,32 @@ jobs:
4245
NEXT_PUBLIC_CROWDIN_DISTRIBUTION_HASH: ${{ secrets.CROWDIN_DISTRIBUTION_HASH }}
4346
with:
4447
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
release: false
49+
args: --publish=never
50+
build_script_name: build:action
4551

46-
- uses: actions/upload-artifact@v4
52+
- name: Upload artifacts
53+
uses: actions/upload-artifact@v4
4754
with:
4855
name: ${{ matrix.os }}-artifacts
49-
path: dist/**/*
56+
path: |
57+
dist/*.dmg
58+
dist/*.zip
59+
dist/latest-mac.yml
60+
dist/*.blockmap
61+
dist/*Setup.exe
62+
dist/*Setup.exe.blockmap
63+
dist/latest.yml
64+
dist/*.AppImage
65+
dist/*.deb
66+
dist/*.rpm
5067
5168
release:
5269
needs: build
5370
runs-on: ubuntu-latest
5471
steps:
55-
- uses: actions/download-artifact@v4
72+
- name: Download artifacts
73+
uses: actions/download-artifact@v4
5674
with: { path: dist }
5775

5876
- name: Update test-version release

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"electron:build": "electron-builder",
2626
"dev": "concurrently \"npm run next:dev\" \"npm run electron:dev\"",
2727
"start": "npm run next:start && npm run electron:start",
28-
"build": "npm run next:build && npm run electron:prep && npm run electron:build"
28+
"build": "npm run next:build && npm run electron:prep && npm run electron:build",
29+
"build:action": "npm run next:build && npm run electron:prep"
2930
},
3031
"dependencies": {
3132
"@crowdin/ota-client": "^2.0.1",

0 commit comments

Comments
 (0)