Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
arition committed Oct 7, 2020
1 parent fd2f176 commit a5f8b06
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches: [master]
pull_request:

# 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: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
if: "!contains(github.event.head_commit.message, 'ci skip')"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v1
with:
node-version: "14"

- name: Install packages
run: yarn

- name: Build
run: yarn electron:build
53 changes: 53 additions & 0 deletions .github/workflows/publish-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: publish-build

on:
push:
tags:
- "v*.*.*"

# 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: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
if: "!contains(github.event.head_commit.message, 'publish-build skip')"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install node
uses: actions/setup-node@v1
with:
node-version: '14'

- name: Install packages
run: yarn

- name: Windows build
if: ${{ matrix.os == 'windows-latest' }}
shell: powershell
run: |
$env:GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
yarn electron:build --windows 7z --publish always
- name: MacOS build
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
run: |
export CSC_IDENTITY_AUTO_DISCOVERY=false
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
yarn electron:build --macos 7z --publish always
- name: Linux build
if: ${{ matrix.os == 'ubuntu-latest' }}
shell: bash
run: |
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
yarn electron:build --linux 7z --publish always
7 changes: 6 additions & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ asarUnpack:
- TorchOCRTaskSchedulerWorkerStarter.js
- node_modules/bindings
- node_modules/file-uri-to-path
- node_modules/js-levenshtein
- node_modules/js-levenshtein
appId: com.freyja.freyja-electron
mac:
category: public.app-category.productivity
linux:
category: AudioVideo

0 comments on commit a5f8b06

Please sign in to comment.