chore: update actions #2
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: PyInstaller Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.12.6' | |
- name: Install Poetry | |
run: | | |
iex ((New-Object System.Net.WebClient).DownloadString('https://install.python-poetry.org')) | |
$env:PATH = "$env:USERPROFILE\.poetry\bin;$env:PATH" | |
- name: Install dependencies using Poetry | |
run: | | |
poetry install --no-dev | |
- name: Install PyInstaller | |
run: poetry add pyinstaller --dev | |
- name: Define version and build with PyInstaller | |
run: | | |
$version = "1.1" | |
$outputName = "1blckhrt_video_generator_v$version.exe" | |
poetry run pyinstaller --onefile --name $outputName src\main.py | |
Rename-Item "dist\main.exe" $outputName | |
- name: Upload PyInstaller build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: built-application | |
path: dist\1blckhrt_video_generator_v1.1.exe | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/[email protected] | |
with: | |
tag_name: v1.1 | |
release_name: "Release v1.1" | |
files: dist\1blckhrt_video_generator_v1.1.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |