Deploy Python Executable file for Windows #32
Workflow file for this run
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: Deploy Python Executable file for Windows | |
on: | |
release: | |
types: [released] | |
env: | |
APP_NAME: 'negar-gui' | |
PACKAGE_PATH: '.' | |
PYTHON_VERSION: '3.8' | |
# Declare default permissions as write-all. | |
permissions: write-all | |
jobs: | |
win-build-and-deploy: | |
runs-on: windows-latest | |
steps: | |
- name: 'Checkout GitHub Action' | |
uses: actions/checkout@v3 | |
- name: Setup Python ${{ env.PYTHON_VERSION }} Environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: 'Resolve Project Dependencies Using Pip' | |
shell: pwsh | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel Pillow PyQt5 pyperclip pyuca qrcode Image requests regex docopt pyqtdarktheme toml | |
pip install python-negar negar-gui | |
pip install PyInstaller | |
- name: 'Clone Python-negar repository' | |
shell: pwsh | |
run: | | |
git clone https://github.com/shahinism/python-negar.git | |
- name: 'Use PyInstaller tool to get executable output' | |
shell: pwsh | |
run: ./.github/build.ps1 | |
- name: 'Upload artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Built | |
path: dist/ | |
- name: 'Automatic release' | |
uses: "softprops/action-gh-release@v1" | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
files: | | |
dist/*.exe |