Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
s
  • Loading branch information
SavageCore committed Jan 16, 2024
1 parent 1676ba7 commit da441f5
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Generate Screenshots

on: [push, pull_request]

jobs:
screenshot:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.x
uses: actions/setup-python@v4
with:
python-version: ">=3.7 <3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
Invoke-WebRequest -Uri "https://www.nirsoft.net/utils/nircmd.zip" -OutFile "nircmd.zip"
Expand-Archive -Path "nircmd.zip" -DestinationPath "C:\nircmd"
echo "C:\nircmd" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run app and take screenshot
run: |
# get version from version.py
$version = (Get-Content torf_gui\version.py | Select-String -Pattern '__version__ = "(.*)"').Matches.Groups[1].Value
# debug print version
Write-Host "Version: $version"
# start app
Start-Process -NoNewWindow -FilePath "python" -ArgumentList "torf_gui/gui.py"
# wait for app to start
Start-Sleep -Seconds 5
# take screenshot
nircmd savescreenshotwin "torf-gui $version" screenshot-light.png
shell: powershell

- name: Upload screenshot
uses: actions/upload-artifact@v3
with:
name: screenshot-light
path: screenshot-light.png

0 comments on commit da441f5

Please sign in to comment.