Skip to content

add sign

add sign #5

name: Build and Scan
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
- name: Build EXE
run: |
python -m PyInstaller --clean --noupx --onefile --windowed --icon=python.ico --add-data "python.ico;." --add-data "python.png;." --name="PythonProjectMngr" app.py
env:
PYTHONIOENCODING: utf-8
- name: Restore code signing certificate
run: |
echo "${{ secrets.PFX_BASE64 }}" | certutil -decode - kingtriton.pfx
shell: powershell
- name: Sign EXE
run: |
signtool sign /f kingtriton.pfx /p "${{ secrets.PFX_PASSWORD }}" /tr http://timestamp.digicert.com /td sha256 /fd sha256 dist\PythonProjectMngr.exe
shell: powershell
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: PythonProjectMngr
path: dist/PythonProjectMngr.exe
- name: VirusTotal GitHub Action
uses: crazy-max/ghaction-virustotal@v4.0.0
with:
vt_api_key: ${{ secrets.VIRUSTOTAL_API_KEY }}
files: dist/PythonProjectMngr.exe