修复工作区不干净的问题
parent
9779c1ebee
commit
e7630e98d9
|
@ -15,8 +15,6 @@ runs:
|
|||
with:
|
||||
path: |
|
||||
${{ env.NPM_CACHE }}
|
||||
${{ env.ELECTRON_CACHE }}
|
||||
${{ env.ELECTRON_BUILDERCACHE }}
|
||||
key: ${{ runner.os }}-node-modules-cache-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-modules-cache-
|
||||
|
|
|
@ -42,8 +42,6 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
env:
|
||||
NPM_CACHE: '%APPDATA%\npm-cache'
|
||||
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache'
|
||||
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache'
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Check out git repository
|
||||
|
@ -53,7 +51,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Build Package Setup x64
|
||||
run: npm run pack:win:setup:x64
|
||||
|
@ -129,8 +129,6 @@ jobs:
|
|||
# needs: CheckCode
|
||||
env:
|
||||
NPM_CACHE: $HOME/.npm
|
||||
ELECTRON_CACHE: $HOME/.cache/electron
|
||||
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
|
||||
steps:
|
||||
- name: Check out git repository
|
||||
uses: actions/checkout@v4
|
||||
|
@ -142,7 +140,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Build Package dmg
|
||||
run: |
|
||||
|
@ -172,8 +172,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NPM_CACHE: $HOME/.npm
|
||||
ELECTRON_CACHE: $HOME/.cache/electron
|
||||
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Install package
|
||||
|
@ -186,7 +184,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Build Package deb amd64
|
||||
run: npm run pack:linux:deb:amd64
|
||||
|
|
|
@ -42,8 +42,6 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
env:
|
||||
NPM_CACHE: '%APPDATA%\npm-cache'
|
||||
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache'
|
||||
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache'
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Check out git repository
|
||||
|
@ -53,7 +51,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Release package
|
||||
run: |
|
||||
|
@ -76,9 +76,6 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
env:
|
||||
NPM_CACHE: '%APPDATA%\npm-cache'
|
||||
ELECTRON_CACHE: '%LOCALAPPDATA%\electron\Cache'
|
||||
ELECTRON_BUILDERCACHE: '%LOCALAPPDATA%\electron-builder\Cache'
|
||||
BUILD_WIN_7: 'true'
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Check out git repository
|
||||
|
@ -88,7 +85,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Prepare win7 electron env
|
||||
run: |
|
||||
|
@ -114,8 +113,6 @@ jobs:
|
|||
runs-on: macos-latest
|
||||
env:
|
||||
NPM_CACHE: $HOME/.npm
|
||||
ELECTRON_CACHE: $HOME/.cache/electron
|
||||
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Check out git repository
|
||||
|
@ -128,7 +125,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Release package
|
||||
run: |
|
||||
|
@ -148,8 +147,6 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
env:
|
||||
NPM_CACHE: $HOME/.npm
|
||||
ELECTRON_CACHE: $HOME/.cache/electron
|
||||
ELECTRON_BUILDERCACHE: $HOME/.cache/electron-builder
|
||||
# needs: CheckCode
|
||||
steps:
|
||||
- name: Install package
|
||||
|
@ -162,7 +159,9 @@ jobs:
|
|||
uses: ./.github/actions/setup
|
||||
|
||||
- name: Build src code
|
||||
run: npm run build
|
||||
run: |
|
||||
git status --porcelain
|
||||
npm run build
|
||||
|
||||
- name: Release package
|
||||
run: |
|
||||
|
|
|
@ -19,7 +19,7 @@ const gitInfo = {
|
|||
}
|
||||
|
||||
try {
|
||||
if (!execSync('git status --porcelain').toString().trim() || process.env.BUILD_WIN_7) {
|
||||
if (!execSync('git status --porcelain').toString().trim()) {
|
||||
gitInfo.commit_id = execSync('git log -1 --pretty=format:"%H"').toString().trim()
|
||||
gitInfo.commit_date = execSync('git log -1 --pretty=format:"%ad" --date=iso-strict').toString().trim()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue