Skip to content

Commit

Permalink
chore: changing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
1blckhrt committed Dec 2, 2024
1 parent 8f96024 commit d47d706
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 35 deletions.
49 changes: 15 additions & 34 deletions .github/workflows/pyinstaller.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,40 @@
name: PyInstaller Workflow
name: Package Application with PyInstaller

on:
push:
branches:
- main
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'
steps:
- uses: actions/checkout@v4

- name: Install Poetry via pip
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
echo "Poetry installed"
- name: Run poetry lock to sync lock file
run: |
poetry lock --no-update
echo "Lock file updated"
- name: Install Project Dependencies
run: poetry install

- name: Install dependencies using Poetry
run: |
poetry install --only main
- name: Install PyInstaller
run: poetry add pyinstaller --dev

- name: Define version and build with PyInstaller
run: |
$version = "1.1"
$outputName = "1blckhrt-video_converter-v$version.exe"
poetry run pyinstaller --onefile --name $outputName src\main.py
- name: Package Application
run: poetry run pyinstaller --onefile --name 1blckhrt-video_converter-v1.1.exe src/main.py
working-directory: src

- name: Upload PyInstaller build artifacts
uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v4
with:
name: built-application
path: dist\1blckhrt-video_converter-v1.1.exe
path: src/dist/1blckhrt-video_converter-v1.1.exe

- name: Create GitHub Release
id: create_release
uses: softprops/[email protected]
with:
tag_name: v1.1
name: "Release v1.1"
files: dist\*
files: src/dist/1blckhrt-video_converter-v1.1.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
118 changes: 117 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pre-commit = "^4.0.1"
commitlint = "^1.3.0"
black = "^24.10.0"
flake8 = "^7.1.1"
pyinstaller = "^6.11.1"

[tool.poe.tasks]
format = "black src/*.py"
Expand Down

0 comments on commit d47d706

Please sign in to comment.