diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 0000000..c935f67 --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,61 @@ +name: CI/CD pipeline + +on: + push: + branches: + - "**" + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Fetch repository + uses: actions/checkout@v6 + - name: Upgrade packages + run: sudo apt update -y && sudo apt upgrade -y + - name: Download and install dependencies + run: sudo apt install -y make golang libgl-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev + - name: Build using make + run: make PREFIX=/usr SYSCONFDIR=/etc + - name: Install to root using make + run: sudo make PREFIX=/usr SYSCONFDIR=/etc install + - name: Run stormfetch + run: stormfetch + publish: + runs-on: ubuntu-latest + needs: test + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && needs.test.result == 'success' + steps: + - name: Fetch repository + uses: actions/checkout@v6 + - name: Check debian changelog version + run: test $(grep '^stormfetch' debian/changelog | head -n1 | grep -Po '(?<=\().*(?=\))' | cut -d '-' -f1) == ${{ github.ref_name }} + - name: Upgrade packages + run: sudo apt update -y && sudo apt upgrade -y + - name: Download and install dependencies + run: sudo apt install -y make debhelper golang libgl-dev libx11-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev + - name: Build deb package + run: dpkg-buildpackage -b + - name: Read changelog + id: read_changelog + run: | + r=$(cat CHANGELOG.md) # Read CHANGELOG.md + r="${r//'%'/'%25'}" # Multiline escape sequences for % + r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n' + r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r' + echo "RELEASE_BODY=$r" >> $GITHUB_OUTPUT # Set environment variable + - name: Upload deb packages release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + release_name: v${{ github.ref_name }} + file: ../*.deb + tag: ${{ github.ref }} + overwrite: true + file_glob: true + draft: true + body: | + ${{ steps.read_changelog.outputs.RELEASE_BODY }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2cd6697 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Ignore IDE directories +/.idea + +# Ignore build directories +/build +/deb/temp +/deb/out + +# Ignore act files +event.json diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0da8b6a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Stormfetch v8.0 Changelog +### Changes: +- [Add CI/CD pipeline](https://github.com/EnumeratedDev/stormfetch/commit/c712f1528af45fcd7859b28b084c3dce64d6e07c) +- [Add debian package source](https://github.com/EnumeratedDev/stormfetch/commit/f04a4b000a419181dd5eb940440676260beaae5f) +- [Separate monitor detection code into different program](https://github.com/EnumeratedDev/stormfetch/commit/da463b35e36eb4413d6ffc258f12398015fedb2b) +### Fixes +- [Return unknown GPU if device info is nil](https://github.com/EnumeratedDev/stormfetch/commit/8dfe7b3a0e0c1f95d34020b1f3fda5142f113671) +- [Fix bash version checking](https://github.com/EnumeratedDev/stormfetch/commit/8147d302c8a8d170c6942378b4b74eac77d755ac) +- [Fix multiple spaces when version number is empty](https://github.com/EnumeratedDev/stormfetch/commit/a919ffb71b78d706062030203029ef470b190e9c) diff --git a/README.md b/README.md index 32843aa..62df58b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,11 @@ At the moment ascii art for different distributions is limited. If you would lik ### Installation Guide #### Using a package manager -- Arch Linux: You may use your favorite AUR manager to install the `stormfetch` package +| Distribution | Package name | +|:----------------------:|:------------------------------------------ | +| Arch Linux/Artix Linux | `stormfetch` from the AUR | +| Debian/Ubuntu | latest .deb file from the releases section | +| Tide Linux | `stormfetch` from the main repository | #### Building from source - Download `go` from your package manager or from the go website - Download `make` from your package manager diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8d7418c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,13 @@ +stormfetch (7.4-1) trixie; urgency=medium + + * Fix version number + * Update debian codename + * Fix debhelper dependency + + -- EnumDev Sat, 18 Apr 2026 14:18:37 +0300 + +stormfetch (7.4.3-1) stretch; urgency=medium + + * Initial packaging work with dpkg-buildpackage. + + -- EnumDev Fri, 17 Apr 2026 16:54:39 +0300 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..436a3a5 --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: stormfetch +Priority: optional +Maintainer: EnumDev +Build-Depends: + debhelper (>= 9), + libgl-dev, + libx11-dev, + libxcursor-dev, + libxi-dev, + libxinerama-dev, + libxrandr-dev, + libxxf86vm-dev +Vcs-Git: https://github.com/EnumeratedDev/stormfetch.git +Vcs-Browser: https://github.com/EnumeratedDev/stormfetch + +Package: stormfetch +Section: universe/utils +Architecture: any +Depends: bash +Suggests: stormfetch-monitor-detection +Description: A linux fetch program written in go + +Package: stormfetch-monitor-detection +Section: universe/utils +Architecture: any +Depends: stormfetch,libgl1,libx11-6,libxcursor1,libxi6,libxinerama1,libxrandr2,libxxf86vm1 +Description: Monitor detection utility for stormfetch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1b958ee --- /dev/null +++ b/debian/rules @@ -0,0 +1,22 @@ +#!/usr/bin/make -f + +clean: + -rm -r debian/stormfetch + -rm -r debian/stormfetch-monitor-detection + +build: + # Build program + make PREFIX=/usr SYSCONFDIR=/etc + +binary: + # Create directories + mkdir -p debian/stormfetch + mkdir -p debian/stormfetch-monitor-detection + # Install program + make DESTDIR=debian/stormfetch PREFIX=/usr SYSCONFDIR=/etc install-stormfetch + make DESTDIR=debian/stormfetch PREFIX=/usr SYSCONFDIR=/etc install-config + # Install monitor detection program + make DESTDIR=debian/stormfetch-monitor-detection PREFIX=/usr SYSCONFDIR=/etc install-stormfetch-monitor-detection + # Finalize packages + dh_gencontrol + dh_builddeb