Seraphim-Solutions/bettercinema

View on GitHub
.github/workflows/pyinstaller.yml

Summary

Maintainability
Test Coverage
name: Package Application with Pyinstaller

on:
  release:
    types: [created]

jobs:
  build-darwin:
    runs-on: macos-latest
    steps:
    - name: Create Executable
      uses: sayyid5416/pyinstaller@v1
      with:
        spec: 'app.py'
        requirements: 'requirements.txt'
        options: --onefile
    - name: Rename Application
      run: mv dist/app dist/BetterCinema_Darwin

    - uses: actions/upload-artifact@v2
      with:
        name: BetterCinema-Darwin
        path: dist/BetterCinema_Darwin # or path/to/artifact

    - name: Release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/')
      with:
        files: dist/BetterCinema_Darwin

  build-windows:
    runs-on: windows-latest
    steps:
    - name: Create Executable
      uses: sayyid5416/pyinstaller@v1
      with:
        spec: 'app.py'
        requirements: 'requirements.txt'
        options: --onefile
    - name: Rename Application
      run: mv dist/app.exe dist/BetterCinema_Windows.exe

    - uses: actions/upload-artifact@v2
      with:
        name: BetterCinema-Windows
        path: dist/BetterCinema_Windows.exe # or path/to/artifact

    - name: Release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/')
      with:
        files: dist/BetterCinema_Windows.exe
  
  build-linux:
    runs-on: ubuntu-latest
    steps:
    - name: Create Executable
      uses: sayyid5416/pyinstaller@v1
      with:
        spec: 'app.py'
        requirements: 'requirements.txt'
        options: --onefile
    - name: Rename Application
      run: mv dist/app dist/BetterCinema_Linux

    - uses: actions/upload-artifact@v2
      with:
        name: BetterCinema-Linux
        path: dist/BetterCinema_Linux # or path/to/artifact

    - name: Release
      uses: softprops/action-gh-release@v1
      if: startsWith(github.ref, 'refs/tags/')
      with:
        files: dist/BetterCinema_Linux