2021-03-23 23:19:44 +01:00
|
|
|
name: CI
|
2020-07-02 08:51:34 +02:00
|
|
|
|
2021-03-23 23:19:44 +01:00
|
|
|
on:
|
|
|
|
# Trigger the workflow on push or pull request,
|
|
|
|
# but only for the master branch
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-03-24 21:30:14 +01:00
|
|
|
tags:
|
|
|
|
- '*'
|
2021-03-23 23:19:44 +01:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-07-02 08:51:34 +02:00
|
|
|
|
|
|
|
jobs:
|
2021-03-23 23:19:44 +01:00
|
|
|
build-linux:
|
|
|
|
name: Linux
|
2021-11-02 07:12:48 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-02 08:51:34 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-02 08:38:09 +01:00
|
|
|
node-version: '16.x'
|
2021-03-23 23:19:44 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get install libx11-dev zlib1g-dev libpng-dev libxtst-dev
|
|
|
|
- name: Build it
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run dist
|
|
|
|
build-mac:
|
|
|
|
name: macOS
|
2021-11-02 07:12:48 +01:00
|
|
|
runs-on: macos-11
|
2021-03-23 23:19:44 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-02 08:38:09 +01:00
|
|
|
node-version: '16.x'
|
2021-11-04 22:29:34 +01:00
|
|
|
- name: Prepare for app signing and notarization
|
|
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
|
|
run: |
|
|
|
|
echo "CSC_LINK=${{ secrets.mac_cert }}" >> $GITHUB_ENV
|
|
|
|
echo "CSC_KEY_PASSWORD=${{ secrets.mac_cert_password }}" >> $GITHUB_ENV
|
|
|
|
echo "APPLE_ID=${{ secrets.apple_id }}" >> $GITHUB_ENV
|
|
|
|
echo "APPLE_ID_PASSWORD=${{ secrets.apple_id_password }}" >> $GITHUB_ENV
|
|
|
|
echo "TEAM_ID=${{ secrets.team_id }}" >> $GITHUB_ENV
|
2021-03-23 23:19:44 +01:00
|
|
|
- name: Build it
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run lint
|
|
|
|
npm run dist
|
|
|
|
build-windows:
|
|
|
|
name: Windows
|
|
|
|
runs-on: windows-2019
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-11-02 08:38:09 +01:00
|
|
|
node-version: '16.x'
|
2021-11-06 13:42:54 +01:00
|
|
|
- name: latest node-gyp for robotjs
|
|
|
|
run: |
|
|
|
|
npm install --global node-gyp@8.4.0
|
|
|
|
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
|
2021-03-23 23:19:44 +01:00
|
|
|
- name: Build it
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run dist
|