name: Continuous deployment

on:
  push:
    branches:
      - master
  release:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        os: [macos-10.15, windows-2019]
        python-version: [3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install packaging dependencies
      run: |
        python -m pip install --upgrade pip
        pip install .
        pip install -r package/requirements.txt
    - name: Install Inno Setup
      if: runner.os == 'Windows'
      run: | 
          choco install innosetup
    - name: Run PyInstaller
      run: |
        cd package
        pyinstaller --noconfirm crispy.spec
        cd ..
    - name: Recursively list folder
      run: |
        ls -R 
    - name: Upload the Windows installer
      uses: actions/upload-artifact@v2
      if: runner.os == 'Windows'
      with:
        name: Crispy-Windows-2019-Python-${{ matrix.python-version }}
        path : package\artifacts\*.exe
    - name: Upload the macOS app
      uses: actions/upload-artifact@v2
      if: runner.os == 'macOS'
      with:
        name: Crispy-macOS-10.15-Python-${{ matrix.python-version }}
        path : package/artifacts/*.dmg

name: Continuous deployment

on:
  pull_request:
  push:
    branches:
      - master
  release:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        os: [macos-10.15, windows-2019]
        python-version: [3.7, 3.8]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install packaging dependencies
      run: |
        python -m pip install --upgrade pip
        pip install .
        pip install -r package/requirements.txt
    - name: Install Inno Setup
      if: runner.os == 'Windows'
      run: | 
          choco install innosetup
    - name: Run PyInstaller
      run: |
        cd package
        pyinstaller --noconfirm crispy.spec
        cd ..
    - name: Recursively list folder
      run: |
        ls -R 
    - name: Upload the Windows installer
      uses: actions/upload-artifact@v2
      if: runner.os == 'Windows'
      with:
        name: Crispy-Windows-2019-Python-${{ matrix.python-version }}
        path : package\artifacts\*.exe
    - name: Upload the macOS app
      uses: actions/upload-artifact@v2
      if: runner.os == 'macOS'
      with:
        name: Crispy-macOS-10.15-Python-${{ matrix.python-version }}
        path : package/artifacts/*.dmg

Add on action on pull request
Add on action on pull request
