From 3acaeae955441d029f44ca39f07c796e7a5d6868 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 24 Mar 2020 09:03:14 -0400 Subject: [PATCH] stub out desktop workflow build file --- workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 workflows/build.yml diff --git a/workflows/build.yml b/workflows/build.yml new file mode 100644 index 00000000..d40116a0 --- /dev/null +++ b/workflows/build.yml @@ -0,0 +1,63 @@ +name: Build + +on: push + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + + steps: + - name: Set up Node + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: Setup environment + shell: pwsh + run: | + npm install -g cloc + if($env:RUNNER_OS -eq "Linux") { + sudo apt-get update + sudo apt-get -y install pkg-config libxss-dev libsecret-1-dev rpm + } + elseif($env:RUNNER_OS -eq "Windows") { + choco --version + } + + - name: Print environment + run: | + node --version + npm --version + git --version + cloc --version + + - name: Checkout repo + uses: actions/checkout@v2 + + - name: Print LOC + run: cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git + + - name: Install Node dependencies + run: npm install + + - name: Run linter + run: npm run lint + + - name: Dist build application + shell: pwsh + run: | + npm install -g cloc + if($env:RUNNER_OS -eq "Linux") { + npm run dist:lin + } + elseif($env:RUNNER_OS -eq "Windows") { + npm run dist:win + } + elseif($env:RUNNER_OS -eq "macOS") { + npm run dist:mac + }