Skip to content

Merge remote-tracking branch 'origin/main' #15

Merge remote-tracking branch 'origin/main'

Merge remote-tracking branch 'origin/main' #15

Workflow file for this run

name: Create Release
on:
push:
tags:
- '*'
jobs:
build:
name: Build app
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-22.04
- os: macos-latest
- os: windows-2019
steps:
- name: Install tk on ubuntu
if: ${{ matrix.config.os == 'ubuntu-22.04'}}
run: |
sudo apt-get update
sudo apt install python3-tk python3-dev python3-setuptools tcl
- name: Install tk on ubuntu
if: ${{ matrix.config.os == 'windows-2019'}}
run: pip install pywin32
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10.8'
- name: Install dependencies for ${{ matrix.config.os }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
pip install pillow
- name: Build with pyinstaller for ${{ matrix.config.os }}
run: pyinstaller scripts/main.py --onefile --noconsole --icon=img/icon.ico --name=PyHolofotes
- name: Rename builded app
run: mv ./dist ./dist-${{ matrix.config.os }}
- name: Upload result job ${{ matrix.config.os }}
uses: actions/upload-artifact@v3
with:
name: PyHolofotes-pyinstaller-artifact
path: ./dist*
release:
name: Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: PyHolofotes-pyinstaller-artifact
- name: Zip file windows
run: zip -r PyHolofotes_windows.zip dist-windows-*
- name: Zip file ubuntu
run: zip -r PyHolofotes_ubuntu.zip dist-ubuntu-*
- name: Zip file macos
run: zip -r PyHolofotes_macos.zip dist-macos-*
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
draft: false
prerelease: false
files: |
PyHolofotes_windows.zip
PyHolofotes_ubuntu.zip
PyHolofotes_macos.zip