Skip to content

fix: add explicit contents:read permission to Windows EXE build job #2

fix: add explicit contents:read permission to Windows EXE build job

fix: add explicit contents:read permission to Windows EXE build job #2

name: Build Windows EXE
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
build-windows-exe:
name: Build tearsheet.exe
runs-on: windows-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build EXE with PyInstaller
run: |
pyinstaller --onefile --name tearsheet --noconfirm tearsheet/__main__.py
- name: Upload EXE artifact
uses: actions/upload-artifact@v4
with:
name: tearsheet-windows-exe
path: dist/tearsheet.exe
if-no-files-found: error
retention-days: 30