Skip to content

Commit 3a4dadb

Browse files
authored
Create main.yml
1 parent d07aa2a commit 3a4dadb

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build ZippyARC
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build_target:
7+
description: "Choose which platform to build"
8+
required: false
9+
default: "all"
10+
type: choice
11+
options:
12+
- all
13+
- windows
14+
- linux
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
os: [windows-latest, ubuntu-latest]
22+
fail-fast: false
23+
24+
steps:
25+
- name: Check build target
26+
if: ${{ github.event.inputs.build_target != 'all' && matrix.os != github.event.inputs.build_target + '-latest' }}
27+
run: echo "Skipping build for ${{ matrix.os }}" && exit 0
28+
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.11'
36+
37+
- name: Install dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install pyinstaller customtkinter py7zr screeninfo CTkListbox requests tkinterdnd2
41+
42+
- name: Build executable
43+
run: |
44+
pyinstaller --noconfirm --onefile --windowed --name ZippyARC main.py
45+
46+
- name: Upload artifact
47+
uses: actions/upload-artifact@v4
48+
with:
49+
name: ZippyARC-${{ matrix.os }}
50+
path: dist/ZippyARC*

0 commit comments

Comments
 (0)