Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicate bundle compilation in CI #81

Merged
merged 6 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
pull_request:

jobs:
format:
name: Check Formatting
compile:
name: Check & Compile
runs-on: ubuntu-latest

steps:
Expand All @@ -18,9 +18,16 @@ jobs:
node-version: "18.x"
cache: "npm"
- name: Install Node.js dependencies
run: npm ci
run: npm ci --ignore-scripts
- name: Check formatting
run: npm run check-format
- name: Compile bundles
run: npm run compile
- name: Upload bundles
uses: actions/upload-artifact@v3
with:
name: bundles
path: bundles/*.js

build:
strategy:
Expand Down Expand Up @@ -50,6 +57,7 @@ jobs:

name: Build for ${{ matrix.platform.displayName }} (${{ matrix.arch }})
runs-on: ${{ matrix.platform.os }}
needs: compile

steps:
- name: Checkout repository
Expand All @@ -69,8 +77,13 @@ jobs:
run: |
echo "CSC_LINK=${{ secrets.MACOS_CERTIFICATE }}" >> $GITHUB_ENV
echo "CSC_KEY_PASSWORD=${{ secrets.MACOS_CERTIFICATE_PWD }}" >> $GITHUB_ENV
- name: Download bundles
uses: actions/download-artifact@v3
with:
name: bundles
path: bundles
- name: Build app
run: npm run build -- --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never
run: npx electron-builder build --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Prepare macOS artifact
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
types: [published]

jobs:
format:
name: Check Formatting
compile:
name: Check & Compile
runs-on: ubuntu-latest

steps:
Expand All @@ -18,9 +18,16 @@ jobs:
node-version: "18.x"
cache: "npm"
- name: Install Node.js dependencies
run: npm ci
run: npm ci --ignore-scripts
- name: Check formatting
run: npm run check-format
- name: Compile bundles
run: npm run compile
- name: Upload bundles
uses: actions/upload-artifact@v3
with:
name: bundles
path: bundles/*.js

build:
strategy:
Expand Down Expand Up @@ -80,6 +87,7 @@ jobs:

name: Build for ${{ matrix.platform.displayName }} (${{ matrix.arch }})
runs-on: ${{ matrix.platform.os }}
needs: compile

steps:
- name: Checkout repository
Expand Down Expand Up @@ -107,8 +115,13 @@ jobs:
echo "APPLE_ID=${{ secrets.MACOS_APPLE_ID }}" >> $GITHUB_ENV
echo "APPLE_ID_PWD=${{ secrets.MACOS_APPLE_ID_PWD }}" >> $GITHUB_ENV
echo "APPLE_ID_TEAM=${{ secrets.MACOS_APPLE_ID_TEAM }}" >> $GITHUB_ENV
- name: Download bundles
uses: actions/download-artifact@v3
with:
name: bundles
path: bundles
- name: Build app
run: npm run build -- --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never
run: npx electron-builder build --${{ matrix.arch }} ${{ matrix.platform.buildArg }} --publish never
env:
NODE_OPTIONS: --max-old-space-size=4096
- name: Prepare macOS artifact
Expand Down