-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.57 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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