Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwynr committed Oct 15, 2024
1 parent cc0f27a commit a3f2078
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
with:
node-version: 20
cache: "npm"
- name: Clear builder cache
run: |
if (Test-Path "$env:ELECTRON_BUILDER_CACHE") {
Remove-Item -Recurse -Force "$env:ELECTRON_BUILDER_CACHE"
}
if (Test-Path "$env:ELECTRON_BUILDER_DOWNLOAD_PATH") {
Remove-Item -Recurse -Force "$env:ELECTRON_BUILDER_DOWNLOAD_PATH"
}
- name: Install dependencies
run: npm install --package-lock-only; npm ci
- name: Install prebuilts
Expand Down Expand Up @@ -72,6 +81,9 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
ELECTRON_BUILDER_CACHE: "/tmp/electron-builder"
ELECTRON_BUILDER_DOWNLOAD_PATH: "/tmp/electron"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -80,6 +92,15 @@ jobs:
with:
node-version: 20
cache: "npm"
- name: Clear builder cache
run: |
if [ -d "$ELECTRON_BUILDER_CACHE" ]; then
rm -rf $ELECTRON_BUILDER_CACHE
fi
if [ -d "$ELECTRON_BUILDER_DOWNLOAD_PATH" ]; then
rm -rf $ELECTRON_BUILDER_DOWNLOAD_PATH
fi
- name: Install dependencies
run: npm install --package-lock-only && npm ci
- name: Install prebuilts
Expand Down Expand Up @@ -131,6 +152,8 @@ jobs:
APPLE_NOTARIZE_ID: ${{ secrets.APPLE_NOTARIZE_ID }}
APPLE_NOTARIZE_PASS: ${{ secrets.APPLE_NOTARIZE_PASS }}
APPLE_NOTARIZE_TEAM_ID: ${{ secrets.APPLE_NOTARIZE_TEAM_ID }}
ELECTRON_BUILDER_CACHE: "/tmp/electron-builder-cache"
ELECTRON_BUILDER_DOWNLOAD_PATH: "/tmp/electron-download"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -139,6 +162,15 @@ jobs:
with:
node-version: 20
cache: "npm"
- name: Clear builder cache
run: |
if [ -d "$ELECTRON_BUILDER_CACHE" ]; then
rm -rf $ELECTRON_BUILDER_CACHE
fi
if [ -d "$ELECTRON_BUILDER_DOWNLOAD_PATH" ]; then
rm -rf $ELECTRON_BUILDER_DOWNLOAD_PATH
fi
- name: Install dependencies
run: npm install --package-lock-only && npm ci
- name: Install prebuilts
Expand Down

0 comments on commit a3f2078

Please sign in to comment.