feat: logger #41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI Build Check | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-check: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: "macos-latest" | |
| build_script: "build:mac" | |
| - platform: "windows-latest" | |
| build_script: "build:win" | |
| - platform: "ubuntu-22.04" | |
| build_script: "build:linux" | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - name: Cache Node.js dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| node_modules | |
| key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node- | |
| - name: Cache electron-builder | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/Library/Caches/electron | |
| ~/Library/Caches/electron-builder | |
| ~/.cache/electron | |
| ~/.cache/electron-builder | |
| ~/AppData/Local/electron/Cache | |
| ~/AppData/Local/electron-builder/Cache | |
| key: ${{ runner.os }}-electron-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-electron- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Import Code-Signing Certificates (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| uses: apple-actions/import-codesign-certs@v3 | |
| with: | |
| p12-file-base64: ${{ secrets.APPLE_CERTIFICATE }} | |
| p12-password: "${{ secrets.APPLE_CERTIFICATE_PASSWORD }}" | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y rpm | |
| - name: Build Electron app | |
| env: | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
| CSC_LINK: ${{ secrets.APPLE_CERTIFICATE }} | |
| CSC_KEY_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npm run ${{ matrix.build_script }} | |
| - name: Upload artifacts (macOS) | |
| if: matrix.platform == 'macos-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-app | |
| path: | | |
| dist/*.dmg | |
| dist/*.zip | |
| dist/*.blockmap | |
| - name: Upload artifacts (Windows) | |
| if: matrix.platform == 'windows-latest' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-app | |
| path: | | |
| dist/*.exe | |
| dist/*.blockmap | |
| - name: Upload artifacts (Linux) | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-app | |
| path: | | |
| dist/*.AppImage | |
| dist/*.blockmap |