diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6236fcc --- /dev/null +++ b/.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') }} diff --git a/.travis.yml b/.travis.yml index e9b64a3..e69de29 100644 --- a/.travis.yml +++ b/.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