# This is a basic workflow to help you get started with Actions name: Build For Windows # Controls when the workflow will run on: # Triggers the workflow on push or pull request events but only for the "master" branch push: branches: ["stop-updating"] pull_request: branches: ["master"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: windows-latest # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/setup-node@v3 with: node-version: 14 - name: Check node/npm version run: | echo "NodeJs version: " node --version echo "npm version: " npm --version # use npm to set up yarn - name: Set up yarn cli run: | npm install --global yarn echo "Yarn version: " yarn --version - name: Set MSVC version run: npm config set msvs_version 2022 # This might be helpful for issues building node-gyp modules on Windows. # - name: Set up npm Windows build tools # run: yarn install -g windows-build-tools - name: Update node-gyp run: | $WhereNode = Get-Command node | Select-Object -ExpandProperty Definition $NodeDirPath = Split-Path $WhereNode -Parent $NodeModulesPath = $NodeDirPath + "\node_modules\npm\node_modules\npm-lifecycle" cd $NodeModulesPath npm install node-gyp@latest - name: Force to latest node-gyp run: | npm install --global node-gyp@latest npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"} # install GNU make - name: Install gnu make using choclatey uses: crazy-max/ghaction-chocolatey@v2 with: args: install make - uses: actions/checkout@v3 # Sets up the node_modules folder with the Windows version of the dependencies - name: Yarn install run: | yarn install --frozen-lockfile --network-timeout=100000 --no-optional yarn check --verify-tree --integrity # Downloads kubernetes dependencies - name: Download client binaries run: yarn download:binaries # Fix the version of the build - name: Fix Build version run: yarn run npm:fix-build-version # Compile - name: Compile run: yarn run compile # clear our pem folder before publish # https://github.com/ukoloff/win-ca#clear-pem-folder-on-publish # - name: Clear CA trust # run: rm -Recursive node_modules/win-ca/pem - name: add path to msbuild run: $env:Path += ";/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/" - name: Electron Builder run: yarn run electron-builder --publish onTag # - name: Make # run: make build - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: built-artifacts path: ./static/build