Skip to content

馃懛 Update main.yml #8

馃懛 Update main.yml

馃懛 Update main.yml #8

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ${{ matrix.image }}
strategy:
matrix:
image: ["windows-latest", "macos-latest", "ubuntu-latest"]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: pip install -r app/requirements.txt
- name: Build application
run: flet pack app/main.py --name watch-movies --icon app/assets/icon.png --product-name watch-movies --product-version "1.0.1" --copyright "Copyright (c) 2024 Edoardo Gruppi"
- name: Archive artifacts
run: |
if [ ${{ matrix.image }} == 'windows-latest' ]; then
7z a watch-movies-windows.zip dist/*.exe
ls $GITHUB_WORKSPACE
mv watch-movies-windows.zip $GITHUB_WORKSPACE
elif [ ${{ matrix.image }} == 'macos-latest' ]; then
tar -czvf watch-movies-macos.tar.gz -C dist watch-movies.app
ls $GITHUB_WORKSPACE
mv watch-movies-macos.tar.gz $GITHUB_WORKSPACE
elif [ ${{ matrix.image }} == 'ubuntu-latest' ]; then
tar -czvf watch-movies-linux.tar.gz -C dist watch-movies
ls $GITHUB_WORKSPACE
mv watch-movies-linux.tar.gz $GITHUB_WORKSPACE
fi
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.image }}-package
path: ${{ github.workspace }}/*.zip