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

Commit

Permalink
Add GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed Nov 16, 2019
1 parent 0eaa9ea commit 9b5e061
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build/release

on: push

jobs:
release:
runs-on: ${{ matrix.os }}

# Platforms to build on/for
strategy:
matrix:
os: [macos-10.14, windows-2019, ubuntu-18.04]

steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 10

- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v1
with:
# Log in to Snap Store
snapcraft_token: ${{ secrets.snapcraft_token }}

- name: Build/release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.github_token }}

# macOS code signing certificate
mac_certs: ${{ secrets.mac_certs }}
mac_certs_password: ${{ secrets.mac_certs_password }}

# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test

on: push

jobs:
test:
runs-on: ${{ matrix.os }}

# Platforms to test on
strategy:
matrix:
os: [macos-10.14, windows-2019, ubuntu-18.04]

steps:
- name: Check out Git repository
uses: actions/checkout@v1

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 10

- name: Run tests
run: |
yarn
yarn test
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"build:ts": "run-p build:ts:*",
"build:ts:main": "webpack --config ./webpack.main.js --mode production",
"build:ts:renderer": "webpack --config ./webpack.renderer.js --mode production",
"build:app": "electron-builder --mac --windows --linux",
"release": "env-cmd run-s build:clean build:ts 'build:app --publish always'",
"website:start": "run-p website:start:*",
"website:start:serve": "serve ./website --listen 3000",
"website:start:ts": "tsc ./website/index.ts --watch",
Expand Down Expand Up @@ -267,6 +265,9 @@
]
},
"linux": {
"target": [
"AppImage"
],
"category": "Office"
},
"dmg": {
Expand Down

0 comments on commit 9b5e061

Please sign in to comment.