Skip to content

Set wallpaper persistently on Windows #58

Set wallpaper persistently on Windows

Set wallpaper persistently on Windows #58

Workflow file for this run

on:
push:
tags:
- "*.*.*"
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Setup Python
id: setup_python
uses: actions/setup-python@v5
with:
python-version: '3.13'
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
- name: Install poetry
run: |
which python
python -m pip install pipx
python -m pipx install poetry
which poetry
python --version
# Use in-project venv but don't cache it to avoid mismatch/broken issues
- name: Bind Poetry to runner Python (Linux/macOS)
if: matrix.os != 'windows-latest'
shell: bash
run: |
if [ -x .venv/bin/python ]; then
echo "Cached venv Python: $(.venv/bin/python --version)"
fi
echo "Runner Python: $(python --version)"
poetry env use "$(command -v python)"
- name: Bind Poetry to runner Python (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
if (Test-Path .venv\Scripts\python.exe) { & .venv\Scripts\python.exe --version }
python --version
poetry env use (Get-Command python).Source
- name: Install Dependencies
run: |
poetry install --with dev
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
- name: Activate venv on Windows
if: matrix.os == 'windows-latest'
run: |
echo ".venv\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Activate venv on Linux/macOS
if: matrix.os != 'windows-latest'
run: echo ".venv/bin" >> $GITHUB_PATH
# Intentionally do not cache .venv
- name: Install system build deps (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y python3-dev patchelf gcc
- name: show py
run: |
which python
which poetry
echo $PATH
python --version
- name: Build (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
./scripts/build-windows.ps1
- name: Build (Linux)
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
bash ./scripts/build-linux.sh
- name: Build (macOS)
if: matrix.os == 'macos-latest'
shell: bash
run: |
bash ./scripts/build-macos.sh
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} Build
path: |
build/DerpiWallpaper.exe
build/DerpiWallpaper.bin
build/DerpiWallpaper
include-hidden-files: true