Bump requests from 2.31.0 to 2.32.3 #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Windows release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build-for-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Set up build environment | |
run: | | |
python -m venv venv | |
.\venv\Scripts\Activate.ps1 | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements-prod.txt -r requirements-build.txt | |
- name: Negotiate Python package hell | |
run: | | |
.\venv\Scripts\Activate.ps1 | |
python -m pip uninstall -y python-magic-bin | |
$url = 'https://files.pythonhosted.org/packages/07/c2/094e3d62b906d952537196603a23aec4bcd7c6126bf80eb14e6f9f4be3a2/python_magic_bin-0.4.14-py2.py3-none-win_amd64.whl' | |
$dest = 'python_magic_bin-0.4.14-py2.py3-none-win_amd64.whl' | |
Write-Host "Downloading from $url" | |
Invoke-WebRequest -Uri $url -OutFile $dest | |
if ((Get-FileHash -Path $dest -Algorithm SHA256).Hash -ne '90BE6206AD31071A36065A2FC169C5AFB5E0355CBE6030E87641C6C62EDC2B69') { | |
Write-Error 'Checksum does not match' | |
exit 1 | |
} | |
python -m pip install $dest | |
- name: Build for Windows | |
run: | | |
.\venv\Scripts\Activate.ps1 | |
python -m PyInstaller -n weatherdl --onefile --add-data 'venv\Lib\site-packages\pptx\templates:pptx\templates' src\main.py | |
- name: Copy config files | |
run: | | |
Copy-Item config.json dist | |
- name: Produce artifacts | |
run: | | |
Compress-Archive -Path dist\* -DestinationPath weatherdl-for-windows.zip | |
- name: Upload artifacts to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
release_name: ${{ github.ref_name }} | |
file: weatherdl-for-windows.zip | |
asset_name: weatherdl-for-windows.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
body: | | |
[Download for Windows](https://github.com/demccormack/weatherdl/releases/download/${{ github.ref_name }}/weatherdl-for-windows.zip) | |
[Download for MacOS](https://github.com/demccormack/weatherdl/releases/download/${{ github.ref_name }}/weatherdl-for-macos.zip) | |
[Download for Ubuntu](https://github.com/demccormack/weatherdl/releases/download/${{ github.ref_name }}/weatherdl-for-ubuntu.zip) |