Skip to content

Build and Attach Artifacts to Release #3

Build and Attach Artifacts to Release

Build and Attach Artifacts to Release #3

Workflow file for this run

name: Build and Attach Artifacts to Release
on:
release:
types: [created]
jobs:
build-release-artifacts:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Build Executable
run: |
pyinstaller --paths=. --name 'disabilitydude' --noconfirm --onedir --windowed --distpath ".\dist" --add-data "./config;config/" "./src/main.py"
- name: Package Artifact
run: |
$ProgressPreference = 'SilentlyContinue'
Compress-Archive -Path .\dist\disabilitydude -Destination ".\disabilitydude.zip" -Force
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./disabilitydude.zip
asset_name: disabilitydude.zip
asset_content_type: application/zip