fix release-ui not prerun pnpm run build so that some file does not exist

This commit is contained in:
geekgeekrun
2024-04-14 16:21:51 +08:00
parent 6ad1e7368f
commit a945d2a7ae
3 changed files with 7 additions and 7 deletions

View File

@@ -44,7 +44,7 @@ jobs:
- name: Build
run: |
cd packages/ui
node ./scripts/github-ci-build.mjs
pnpm run build:make-dist-for-current-platform
- name: Upload artifact
uses: actions/upload-artifact@v4
@@ -75,7 +75,7 @@ jobs:
- name: Build
run: |
cd packages/ui
node ./scripts/github-ci-build.mjs
pnpm run build:make-dist-for-current-platform
- name: Upload artifact
uses: actions/upload-artifact@v4
@@ -106,7 +106,7 @@ jobs:
- name: Build
run: |
cd packages/ui
node ./scripts/github-ci-build.mjs
pnpm run build:make-dist-for-current-platform
- name: Upload artifact
uses: actions/upload-artifact@v4

View File

@@ -1,2 +0,0 @@
import makeDistForCurrentPlatform from './steps/make-dist-for-current-platform.mjs'
makeDistForCurrentPlatform()

View File

@@ -3,12 +3,12 @@ import yaml from 'js-yaml'
import url from 'node:url'
import path from 'node:path'
import fs from 'node:fs'
import { buildTargetListMapByPlatform, osPlatformToBuildCommandMap } from '../vars/os.mjs'
import { buildTargetListMapByPlatform, osPlatformToBuildCommandMap } from './vars/os.mjs'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const getBuilderConfig = () => {
return yaml.load(fs.readFileSync(path.join(__dirname, '../../electron-builder.yml'), 'utf8'))
return yaml.load(fs.readFileSync(path.join(__dirname, '../electron-builder.yml'), 'utf8'))
}
export default async function makeDistForCurrentPlatform() {
@@ -25,3 +25,5 @@ export default async function makeDistForCurrentPlatform() {
return await builder.build(buildParameter)
}
makeDistForCurrentPlatform()