Skip to content

Commit

Permalink
github actions ci (#52)
Browse files Browse the repository at this point in the history
* add github actions ci
  • Loading branch information
beichenzhidi committed Jan 14, 2021
1 parent dac82c5 commit 39b0952
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 32 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,38 @@
name: CI/CD For QLCTracker
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node 12.x
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Install dependencies
run: npm i
- name: Build Web Version
run: npm run qlc:build
- name: Archive build
if: success()
uses: actions/upload-artifact@v1
with:
name: deploy_dist
path: dist
- name: Build 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 }}

build_script_name: qlc:build-desktop
# 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') }}
32 changes: 0 additions & 32 deletions .travis.yml
@@ -1,32 +0,0 @@
matrix:
include:
- os: osx
osx_image: xcode10.2
language: node_js
node_js: "10"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
echo $CERTIFICATE_OSX_P12 | base64 --decode > keystore.p12;
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain;
security default-keychain -s build.keychain;
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain;
security import keystore.p12 -k build.keychain -P $KEYCHAIN_PASSWORD -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD build.keychain;
npm install;
npm run qlc:build-desktop-high-mem;
npm run desktop:full;
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

0 comments on commit 39b0952

Please sign in to comment.