From f6fe6d44775078b8475842135ca7ad1e3e82bbb7 Mon Sep 17 00:00:00 2001 From: akshun Date: Thu, 12 Jun 2025 01:57:31 +0000 Subject: [PATCH] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 71 ++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 19 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d254237..49bd3b8 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,6 +1,12 @@ name: Build on Multiple Distributions -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build-on-arch: @@ -8,21 +14,30 @@ jobs: container: image: archlinux:latest steps: - - name: Install Dependencies + + - name: Install basic dependencies run: | pacman -Syu --noconfirm - pacman -S --noconfirm git python python-pip nodejs npm binutils + pacman -S --noconfirm nodejs npm - - name: Checkout Code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + pacman -S --noconfirm python python-pip binutils + + - name: Prepare Python environment + run: | + mv /lib/python3*/EXTERNALLY-MANAGED . + pip install --upgrade pip + pip install pyinstaller inquirerpy distro - name: Build with PyInstaller run: | - pip install pyinstaller inquirerpy distro pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py - - name: Upload Artifact - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-artifact@v4 with: name: arch-setup path: dist/setup @@ -32,20 +47,29 @@ jobs: container: image: debian:stable steps: - - name: Install Dependencies + + - name: Install basic dependencies run: | apt update && apt upgrade -y - apt install -y git python3 python3-pip nodejs npm binutils + apt install -y git nodejs npm - uses: actions/checkout@v4 + - name: Install dependencies + run: | + apt install -y python3 python3-pip binutils + + - name: Prepare Python environment + run: | + mv /lib/python*/EXTERNALLY-MANAGED . + pip install pyinstaller inquirerpy distro + - name: Build with PyInstaller run: | - pip install pyinstaller inquirerpy distro pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py - - name: Upload Artifact - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-artifact@v4 with: name: debian-setup path: dist/setup @@ -55,20 +79,29 @@ jobs: container: image: fedora:latest steps: - - name: Install Dependencies + + - name: Install basic dependencies run: | dnf up -y - dnf install -y git python3 python3-pip nodejs npm + dnf install -y git nodejs npm - uses: actions/checkout@v4 + - name: Install dependencies + run: | + dnf install -y python python-pip binutils + + - name: Install Python dependencies + run: | + pip install inquirerpy distro pyinstaller + - name: Build with PyInstaller run: | - pip install pyinstaller inquirerpy distro pyinstaller --onefile --add-data "bash/:bash/" --add-data "prompts/:prompts/" --add-data "config/:config/" setup.py - - name: Upload Artifact - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-artifact@v4 with: name: fedora-setup - path: dist/setup \ No newline at end of file + path: dist/setup +