windoza-exe.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # Build windoza .exe with pyinstaller and add it to latest release
  2. name: Windoza standalone .exe
  3. on:
  4. release:
  5. types: [created]
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. jobs:
  9. build:
  10. runs-on: windows-latest
  11. steps:
  12. - uses: actions/checkout@v2
  13. - uses: actions/cache@v2
  14. with:
  15. path: ~\AppData\Local\pip\Cache
  16. key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
  17. restore-keys: |
  18. ${{ runner.os }}-pip-
  19. - name: Install requirements.txt
  20. run: pip install -r requirements.txt
  21. - name: Install pyinstaller
  22. run: pip install pyinstaller
  23. - name: Build exe
  24. run: pyinstaller --onefile google_photos_takeout_helper\__main__.py
  25. - name: Get Latest Release
  26. uses: pozetroninc/github-action-get-latest-release@v0.5.0
  27. with:
  28. repository: ${{ github.repository }}
  29. id: latest-tag
  30. - name: Upload exe to latest release
  31. uses: svenstaro/upload-release-action@v2
  32. with:
  33. repo_token: ${{ secrets.GITHUB_TOKEN }}
  34. file: .\dist\__main__.exe
  35. asset_name: takeout-helper.exe
  36. tag: ${{ steps.latest-tag.outputs.release }}
  37. overwrite: true