Skip to content

Commit 39e4a63

Browse files
committed
GreenSync V1.0
0 parents  commit 39e4a63

22 files changed

+1621
-0
lines changed
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: GreenSync-Build and Release
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: "Enter the version (e.g., v1.0.0)"
12+
required: true
13+
14+
jobs:
15+
build:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [windows-latest, ubuntu-latest, macos-latest]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: "3.x"
31+
32+
- name: Install dependencies
33+
run:
34+
pip install -r requirements.txt
35+
36+
- name: Build executables
37+
run: |
38+
pyinstaller --onefile make_greensync_operations.py
39+
pyinstaller --onefile make_projects_list_from_base_folder.py
40+
41+
- name: Prepare release folder
42+
run: |
43+
mkdir GreenSync
44+
cp dist/* GreenSync/
45+
cp greensync_config.yaml GreenSync/
46+
cp greensync_template.xml GreenSync/
47+
cp readme.md GreenSync/
48+
shell: bash
49+
50+
- name: Archive artifacts (windows-latest)
51+
if: matrix.os == 'windows-latest'
52+
run: |
53+
Compress-Archive -Path GreenSync\ -DestinationPath GreenSync_${{ github.event.inputs.version }}_${{ runner.os }}.zip
54+
shell: powershell
55+
56+
- name: Make files executable (Linux/Mac)
57+
if: matrix.os != 'windows-latest'
58+
run: |
59+
chmod +x make_* || true
60+
shell: bash
61+
62+
- name: Archive artifacts (Linux/macOS)
63+
if: matrix.os != 'windows-latest'
64+
run: |
65+
tar -czvf GreenSync_${{ github.event.inputs.version }}_${{ runner.os }}.tar.gz GreenSync
66+
shell: bash
67+
68+
- name: Upload artifact
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: GreenSync_${{ github.event.inputs.version }}_${{ runner.os }}
72+
path: |
73+
GreenSync_${{ github.event.inputs.version }}_${{ runner.os }}.*
74+
75+
release:
76+
needs: build
77+
runs-on: ubuntu-latest
78+
79+
steps:
80+
# - name: Checkout repository
81+
# uses: actions/checkout@v4
82+
83+
- name: Download all build artifacts
84+
uses: actions/download-artifact@v4
85+
with:
86+
merge-multiple: true
87+
88+
- name: List downloaded files (Debugging)
89+
run: ls -R
90+
91+
# - name: Make files executable (Linux/Mac)
92+
# run: chmod +x app-* || true
93+
94+
- name: Create GitHub Release
95+
uses: softprops/action-gh-release@v2
96+
with:
97+
tag_name: ${{ github.event.inputs.version }}
98+
name: Release ${{ github.event.inputs.version }}
99+
draft: false
100+
prerelease: false
101+
files: |
102+
*
103+
# GreenSync_<VER>_Windows.tar.gz
104+
# GreenSync_<VER>_Linux.tar.gz
105+
# GreenSync_<VER>_macOS.tar.gz
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Build and Release Executables (Deprecated)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Enter the version (e.g., v1.0.0)"
8+
required: true
9+
10+
jobs:
11+
build:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
16+
runs-on: ${{ matrix.os }}
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.x"
26+
27+
- name: Install dependencies
28+
run: pip install -r requirements.txt
29+
30+
- name: Build executable make_greensync_operations.py
31+
run: pyinstaller --onefile make_greensync_operations.py
32+
33+
- name: Build executable make_projects_list_from_base_folder.py
34+
run: pyinstaller --onefile make_projects_list_from_base_folder.py
35+
36+
#- name: copy configs
37+
#run: shutil.copyfile('greensync_config.yaml', '{0}/greensync_config.yaml'.format(DISTPATH))
38+
#shutil.copyfile('greensync_template.xml', '{0}/shared_runtime/greensync_template.xml'.format(DISTPATH))
39+
40+
- name: Create archive (Linux/macOS)
41+
if: matrix.os != 'windows-latest'
42+
run: |
43+
tar -czvf app-archive-${{ matrix.os }}.tar.gz dist/
44+
shell: bash
45+
46+
47+
- name: Rename executable
48+
run: |
49+
if [[ "$RUNNER_OS" == "Windows" ]]; then
50+
mv dist/make_greensync_operations.exe dist/make_greensync_operations-windows.exe
51+
elif [[ "$RUNNER_OS" == "Linux" ]]; then
52+
mv dist/make_greensync_operations dist/make_greensync_operations-linux
53+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
54+
mv dist/make_greensync_operations dist/make_greensync_operations-macos
55+
fi
56+
shell: bash
57+
58+
- name: Upload artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: app-${{ matrix.os }}
62+
path: dist/*
63+
64+
release:
65+
needs: build
66+
runs-on: ubuntu-latest
67+
68+
steps:
69+
- name: Checkout repository
70+
uses: actions/checkout@v4
71+
72+
- name: Download all build artifacts
73+
uses: actions/download-artifact@v4
74+
with:
75+
merge-multiple: true
76+
77+
- name: List downloaded files (Debugging)
78+
run: ls -R
79+
80+
- name: Make files executable (Linux/Mac)
81+
run: chmod +x app-* || true
82+
83+
- name: Create GitHub Release
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
tag_name: ${{ github.event.inputs.version }}
87+
name: Release ${{ github.event.inputs.version }}
88+
draft: false
89+
prerelease: false
90+
files: |
91+
*

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
make_sync_operations.spec
2+
newfile - looks good! make project list works well.yaml
3+
readme.txt
4+
temp.py
5+
template - from chatgpt.xml
6+
todo.txt

0 commit comments

Comments
 (0)