-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (111 loc) · 3.67 KB
/
python-app.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Auto-release
on:
push:
branches: [ "master" ]
tags:
- "*"
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
release-version:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: recursive submodule
shell: bash
run: |
ls -al IfritAI/
git submodule update --init --recursive
ls -al IfritAI/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r IfritAI/requirements.txt
pip install -r IfritXlsx/requirements.txt
pip install pyinstaller
python --version
pip freeze
- uses: milliewalky/setup-7-zip@v1
- name: Create xlsx release
shell: bash
run: |
cd IfritXlsx/
pyinstaller -n IfritXlsx -F --specpath release/build --distpath release --workpath release/build main.py
cp -r Resources/ release/
mkdir -p release/OriginalFiles/
mkdir -p release/OutputFiles/
rm -r release/build
cd release
ls -al
cd ..
cd ..
- name: Create ai release
shell: bash
run: |
cd IfritAI/
pyinstaller -n IfritAI -F --specpath release/build --distpath release --workpath release/build --onefile --icon=../../Resources/icon.ico main.py
mkdir -p release/FF8GameData
mkdir OriginalFiles/
cp -R Resources release/
cp -R FF8GameData/Resources release/FF8GameData/
cd release
rm -r build
ls -al
cd ..
- name: Create full release - Start
shell: bash
run: |
mkdir -p release/IfritEnhanced
mkdir -p release/IfritEnhanced/IfritGui
mkdir -p release/IfritEnhanced/IfritAI
mkdir -p release/IfritEnhanced/IfritXlsx
cp -R IfritAI/release/* release/IfritEnhanced/IfritAI/
cp -R IfritXlsx/release/* release/IfritEnhanced/IfritXlsx/
cp -R IfritGui/publish/* release/IfritEnhanced/IfritGui/
rm -rf IfritAI/release
rm -rf IfritXlsx/release
- name: zip name continuous
shell: bash
if: github.event.ref_type != 'tag' && github.ref == 'refs/heads/master'
run: |
cd release/IfritEnhanced
7z a -tzip "../IfritEnhanced-continuous-${{ github.sha}}.zip" .
pwd
cd ..
ls -al
cd ..
ls -al
- name: zip name tag
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
cd release/IfritEnhanced
7z a -tzip "../IfritEnhanced-${{ github.ref_name }}.zip" .
- name: Deploy Package
if: github.event.ref_type != 'tag' && github.ref == 'refs/heads/master'
uses: crowbarmaster/GH-Automatic-Releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "continuous"
prerelease: true
title: "Unstable Build"
files: |
release/IfritEnhanced-*.zip
- name: Deploy tag Package
if: startsWith(github.ref, 'refs/tags/')
uses: crowbarmaster/GH-Automatic-Releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: ${{ github.ref_name }}
title: "IfritEnhanced-${{ github.ref_name }}"
files: |
release/IfritEnhanced-*.zip