1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/.github/workflows/build-for-windows.yml
JoelBirlingmairBeastCode ebd3e3ce02
Use special node gyp
2022-08-23 20:51:30 -05:00

87 lines
2.6 KiB
YAML

# 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
# use npm to set up yarn
- name: Set up yarn cli
run: |
npm install --global yarn
yarn --version
- 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@8.x
# 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: 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