From e6503c98b529a702efb0e4c7f13186ec3a070481 Mon Sep 17 00:00:00 2001 From: Rodrigo Date: Tue, 5 Dec 2023 22:57:08 +0100 Subject: [PATCH] main build --- .github/workflows/build.yml | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ccf34a4..b09b79aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,3 +62,58 @@ jobs: with: name: EmuDeck-AppImage path: '**/*.AppImage' + publish-windows: + # To enable auto publishing to github, update your electron publisher + # config in package.json > "build" and remove the conditional below + #if: ${{ github.repository_owner === 'electron-react-boilerplate' }} + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [macOS-latest] + + steps: + - name: Checkout git repo + uses: actions/checkout@v3 + + - name: Git Submodule Update + run: git submodule update --init --recursive + + - name: Use cached node_modules + id: cache-node_modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }} + + - name: Install Node and NPM + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + cache: npm + + - name: Install dependencies + if: steps.cache-node_modules.outputs.cache-hit != 'true' + run: npm ci + + - name: Publish releases + env: + # These values are used for auto updates signing + #APPLE_ID: ${{ secrets.APPLE_ID }} + #APPLE_ID_PASS: ${{ secrets.APPLE_ID_PASS }} + #CSC_LINK: ${{ secrets.CSC_LINK }} + #CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + # This is used for uploading release assets to github + #npm run build:${GITHUB_REF##*/} -> Branch name + #npm exec electron-builder -- --publish always --linux --win + GH_TOKEN: ${{ secrets.github_token }} + run: | + npm run postinstall + npm run build + npm exec electron-builder -- --publish always --win --x64 + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + name: EmuDeck-windows + path: '**/*.exe'