-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (46 loc) · 1.72 KB
/
build.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
name: "Build and test"
on:
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, [self-hosted, Linux], [self-hosted, windows-server-2016]]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Create executable with pyinstaller"
shell: bash
run: |
python3 -m venv venv
if [ "$RUNNER_OS" == "Windows" ]; then
./venv/Scripts/activate.bat
else
source venv/bin/activate
fi
pip3 install pip-tools
python3 -m piptools compile -o requirements.txt pyproject.toml
pip3 install -r requirements.txt
pyinstaller --onefile --icon=updater.ico updater.py
- name: "Check if updater works correctly"
run: |
mkdir Release
mkdir -p Release/Updater
mv dist/* Release/Updater/
mkdir -p Release/ImperatorToCK3
mv Release/Updater Release/Updater-running
cd Release/Updater-running
if [ "$RUNNER_OS" == "Windows" ]; then
./updater.exe "https://github.com/ParadoxGameConverters/ImperatorToCK3/releases/download/6.1.3/ImperatorToCK3-win-x64.zip" "ImperatorToCK3/"
elif [ "$RUNNER_OS" == "macOS" ]; then
./updater "https://github.com/ParadoxGameConverters/ImperatorToCK3/releases/download/6.1.3/ImperatorToCK3-osx-x64.tgz" "ImperatorToCK3/"
elif [ "$RUNNER_OS" == "Linux" ]; then
./updater "https://github.com/ParadoxGameConverters/ImperatorToCK3/releases/download/6.1.3/ImperatorToCK3-linux-x64.tgz" "ImperatorToCK3/"
else
echo "Unknown OS: $RUNNER_OS"
exit 1
fi
shell: bash