-
Notifications
You must be signed in to change notification settings - Fork 13
98 lines (86 loc) · 3.13 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
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
name: Build and Compress EXE and Compile Stuff
on:
push:
branches:
- main
tags:
- v
pull_request:
jobs:
build-and-compress:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false # Allows jobs to fail independently
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set Up Python
uses: actions/[email protected]
with:
python-version: '3.13'
- name: Create Virtual Environment
run: python -m venv venv
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install -r Source/requirements.txt
pip install -r Source/requirements.dev.txt
pip install requests
- name: Build EXE (Windows)
if: matrix.os == 'windows-latest'
run: |
echo "Current Path: "
echo %cd%
call venv\\Scripts\\activate
echo "Virtual environment activated. Now running pyinstaller."
pyinstaller ^
--name "RFD" ^
--onefile D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/Source/_main.py ^
--paths D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/Source/ ^
--workpath D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/PyInstallerWork ^
--distpath D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/dist ^
--icon D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/Source/Icon.ico ^
--specpath D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/PyInstallerWork/Spec ^
--add-data "D:/a/Roblox-Freedom-Distribution/Roblox-Freedom-Distribution/Source/*;Source" ^
--hidden-import requests
shell: cmd
- name: Build EXE (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
source venv/bin/activate
echo "Virtual environment activated. Now running pyinstaller."
pyinstaller \
--name "RFD" \
--onefile $GITHUB_WORKSPACE/Source/_main.py \
--paths $GITHUB_WORKSPACE/Source/ \
--workpath $GITHUB_WORKSPACE/PyInstallerWork \
--distpath $GITHUB_WORKSPACE/dist \
--icon $GITHUB_WORKSPACE/Source/Icon.ico \
--specpath $GITHUB_WORKSPACE/PyInstallerWork/Spec \
--add-data "$GITHUB_WORKSPACE/Source/*:Source" \
--hidden-import requests
shell: bash
- name: Compress Executable (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: zip -j RFD_release.zip dist/RFD
- name: Upload Artifact (Windows)
if: matrix.os == 'windows-latest'
uses: actions/[email protected]
with:
name: RFD-Release-windows
path: dist/RFD.exe
- name: Upload Artifact (Ubuntu)
if: matrix.os == 'ubuntu-latest'
uses: actions/[email protected]
with:
name: RFD-Release-ubuntu
path: RFD_release.zip
- name: Release with Notes
uses: softprops/action-gh-release@v1
with:
files: "*"
tag_name: "commit-${{ github.event.head_commit.id }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}