Skip to content

WIP - Automate readme screenshots #70

WIP - Automate readme screenshots

WIP - Automate readme screenshots #70

Workflow file for this run

name: Generate Screenshots
on:
pull_request:
push:
tags:
- "v*"
jobs:
screenshot:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: ">=3.7 <3.12"
cache: "pip"
- name: Install dependencies
run: |
pip install -r requirements.txt
shell: powershell
- name: Increase resolution
run: |
Set-DisplayResolution -Width 1920 -Height 1080 -Force
shell: powershell
- name: Hide taskbar
run: |
$location = @{Path = 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'; Name = 'Settings'}
$value = Get-ItemPropertyValue @location
$value[8] = 123
Set-ItemProperty @location $value
Stop-Process -Name Explorer
shell: powershell
- name: Run app and take screenshot (Light mode)
run: |
.\screenshot.ps1 light
shell: powershell
- name: Set dark mode
run: |
$darkMode = New-Object -ComObject WScript.Shell
$darkModeReg = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
$darkMode.SetValue($darkModeReg, "AppsUseLightTheme", 0, "REG_DWORD")
shell: powershell
- name: Run app and take screenshot (Dark mode)
run: |
.\screenshot.ps1 dark
shell: powershell
- name: Upload screenshots
uses: actions/upload-artifact@v4
with:
name: screenshots
path: screenshot-*.png