Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #144 from thislooksfun/feature/auto-build
Browse files Browse the repository at this point in the history
Finish implementing auto build
  • Loading branch information
mergify[bot] authored Dec 5, 2019
2 parents 7866fed + c8e66ea commit af563e6
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ name: Release Builder

on:
push:
branches:
- master
tags:
- v**
release:
types: [published, created, edited, prereleased]

jobs:
build:
Expand All @@ -25,13 +21,20 @@ jobs:
node-version: 12.x
- run: npm install

# Patch
# TODO: Remove this patch once once electron-builder v22.x is out
# BODY: The GITHUB_TOKEN is of the form 'v1.xxx...', but
# BODY: electron-builder versions older than v22.x don't support that
# BODY: format. Once vue-cli-plugin-electron-builder switches to using
# BODY: electron-builder v22.x or later, this patch can be removed.
# BODY: For reference, see electron-userland/electron-builder#4176
- name: Temporarily fix electron-builder
run: sed -i 's/\^\[\\w/\^\[.\\w/g' node_modules/builder-util/out/util.js
shell: bash

# Build
- name: Build on ${{ matrix.os }}
run: |
if [ "${{ matrix.os }}" == 'windows-latest' ]; then
npm run electron:build -- -w # -p always
elif [ "${{ matrix.os }}" == 'macos-latest' ]; then
npm run electron:build -- -m # -p always
elif [ "${{ matrix.os }}" == 'ubuntu-latest' ]; then
npm run electron:build -- -l # -p always
fi
run: ./scripts/build "${{ matrix.os }}"
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions scripts/build
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -e

if [ "$1" == 'windows-latest' ]; then target="-w"
elif [ "$1" == 'macos-latest' ]; then target="-m"
elif [ "$1" == 'ubuntu-latest' ]; then target="-l"
fi

npm run electron:build -- $target -p always

0 comments on commit af563e6

Please sign in to comment.