Skip to content

Commit ae4dd4e

Browse files
fix: added github actions for automated release
1 parent 277c384 commit ae4dd4e

3 files changed

Lines changed: 41 additions & 4 deletions

File tree

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Create EXE
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
permissions: write-all
11+
12+
steps:
13+
- name: Set up Repository
14+
uses: actions/checkout@v4
15+
with:
16+
ref: main
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.x"
22+
23+
- uses: ilammy/msvc-dev-cmd@v1.4.1
24+
25+
- name: Setup the App
26+
run: |
27+
setup.bat
28+
29+
- name: Build Exe
30+
run: |
31+
build-exe.bat
32+
33+
- name: Update recent release
34+
uses: xresloader/upload-to-github-release@v1
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
with:
38+
file: "dist/compass/compass.exe"
39+
tags: true

build-exe.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pyinstaller --name=start website\start.py --copy-metadata django-bootstrap-v5 --noconfirm --add-data=website\algorithms\templates:algorithms\templates
1+
pyinstaller --onefile --name=compass website\start.py --copy-metadata django-bootstrap-v5 --noconfirm --add-data=website\algorithms\templates:algorithms\templates
22
xcopy website\algorithms\programcodes dist\start\algorithms\programcodes /e /i /h

setup.bat

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ cd ..
55
python -m venv venv
66
venv/bin/activate.bat
77
pip install -r requirements.txt
8-
build_script.bat
9-
cd website
10-
python manage.py runserver
8+
build_script.bat

0 commit comments

Comments
 (0)