diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 7c33723..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build ALG App Store - -on: - push: - branches: [ "main", "qt6/c++" ] - pull_request: - branches: [ "main", "qt6/c++" ] - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - qt6-base-dev \ - qt6-tools-dev \ - qt6-tools-dev-tools \ - libalpm-dev \ - libarchive-dev \ - libcurl4-openssl-dev \ - pkg-config - - - name: Configure CMake - run: | - mkdir -p build - cd build - cmake .. - - - name: Build - run: | - cd build - make -j$(nproc) - - - name: Check build artifacts - run: | - ls -lh build/alg-app-store - file build/alg-app-store - - - name: Upload build artifact - uses: actions/upload-artifact@v4 - with: - name: alg-app-store - path: build/alg-app-store - retention-days: 7 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9ccbd91 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,152 @@ +name: Build and Release ALG App Store + +on: + push: + branches: [ "main", "devel", "qt6" ] + paths: + - '**.cpp' + - '**.h' + - 'CMakeLists.txt' + - '.github/workflows/**' + pull_request: + branches: [ "main", "devel", "qt6" ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: archlinux:latest + outputs: + version: ${{ steps.get_version.outputs.version }} + should_release: ${{ steps.check_release.outputs.should_release }} + artifact_name: ${{ steps.artifact.outputs.name }} + + steps: + - name: Install base dependencies + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm --needed \ + base-devel \ + git \ + cmake \ + qt6-base \ + qt6-tools \ + pacman \ + libarchive \ + curl \ + pkgconf + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 2 # Need history to check changed files + + - name: Mark git directory as safe + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + + - name: Extract version from CMakeLists.txt + id: get_version + run: | + VERSION=$(grep -oP 'project\(alg-app-store VERSION \K[0-9]+\.[0-9]+\.[0-9]+' CMakeLists.txt) + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Detected version: $VERSION" + + - name: Check if this should trigger a release + id: check_release + run: | + # Only release on main branch when CMakeLists.txt was modified + if [[ "${{ github.ref }}" == "refs/heads/main" && "${{ github.event_name }}" == "push" ]]; then + # Check if CMakeLists.txt was changed in this push + if git diff --name-only HEAD~1 HEAD | grep -q "CMakeLists.txt"; then + echo "should_release=true" >> $GITHUB_OUTPUT + echo "Release triggered: CMakeLists.txt changed on main branch" + else + echo "should_release=false" >> $GITHUB_OUTPUT + echo "No release: CMakeLists.txt not changed" + fi + else + echo "should_release=false" >> $GITHUB_OUTPUT + echo "No release: not on main branch or not a push event" + fi + + - name: Configure CMake + run: | + mkdir -p build + cd build + cmake .. + + - name: Build + run: | + cd build + make -j$(nproc) + + - name: Check build artifacts + run: | + ls -lh build/alg-app-store + file build/alg-app-store + + - name: Set artifact name + id: artifact + run: | + # Replace forward slashes with dashes to handle PR refs like "12/merge" + ARTIFACT_NAME="alg-app-store-${{ github.ref_name }}-${{ steps.get_version.outputs.version }}" + ARTIFACT_NAME="${ARTIFACT_NAME//\//-}" + echo "name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT + echo "Artifact name: $ARTIFACT_NAME" + + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.artifact.outputs.name }} + path: build/alg-app-store + retention-days: 30 + + release: + needs: build + runs-on: ubuntu-latest + if: needs.build.outputs.should_release == 'true' + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: ${{ needs.build.outputs.artifact_name }} + path: ./release + + - name: Prepare release assets + run: | + chmod +x ./release/alg-app-store + tar -czvf alg-app-store-${{ needs.build.outputs.version }}-linux-x86_64.tar.gz -C ./release alg-app-store + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: v${{ needs.build.outputs.version }} + name: ALG App Store v${{ needs.build.outputs.version }} + body: | + ## ALG App Store v${{ needs.build.outputs.version }} + + A modern package manager GUI for Arch Linux. + + ### Installation + ```bash + tar -xzvf alg-app-store-${{ needs.build.outputs.version }}-linux-x86_64.tar.gz + sudo mv alg-app-store /usr/local/bin/ + ``` + + ### Requirements + - Qt6 (Core, Gui, Widgets, Network, Concurrent) + - libalpm (pacman library) + - yay or paru (for AUR support) + files: | + alg-app-store-${{ needs.build.outputs.version }}-linux-x86_64.tar.gz + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 6148f4a..e990cd5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.16) -project(alg-app-store VERSION 2.0.0 LANGUAGES CXX) +project(alg-app-store VERSION 0.2.28 LANGUAGES CXX) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/TODO.md b/TODO.md index 1b5b1cc..6998488 100644 --- a/TODO.md +++ b/TODO.md @@ -1,9 +1,15 @@ - [x] Add chaotic aur to search tab if enabled - [x] Add launch button on package card if package is installed and remove when uninstalled - [] Add detailed mirrorlist tab to set mirrorlist -- [] Add version information +- [x] Add version information - [] Implement an AUR helper in core to remove dependence on paru and yay - +- [] Ask password only once on startup - startup_auth +- [] Improve settings page - settings_tab +- [] Move all styles to single stylesheet - style_and_theme +- [] Clean up UI; make UI look more modern (check gnome's styling options) - style_and_theme +- [] Set a light/dark theme toggle, or follow system's theme - style_and_theme +- [] Look into spdlog for logging +- [] Look into CppUTest or Google Test (gtest) for test ## Future Enhancements diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 8282b08..dd71d18 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -117,7 +117,7 @@ void MainWindow::createMenuBar() { QMessageBox::about(this, "About ALG App Store", "ALG App Store (Beta)\n\n" "A modern package manager for Arch Linux\n" - "Version: 0.2.26\n" + "Version: 0.2.28\n" "Built with Qt6 and C++17\n\n" "© 2025 Arka Linux GUI"); });