Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: UniNews CI/CD Pipeline

on:
push:
branches: ["main", "geo"]
tags: ["v*"]
pull_request:
branches: ["main"]

jobs:
validate-and-package:
runs-on: ubuntu-24.04

permissions:
contents: write

steps:
- name: Checkout Source Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install ruff setuptools wheel
pip install -r requirements.txt

- name: Run Ruff Static Analysis
run: |
ruff check . --fix

- name: Install Native Build Tools
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
debhelper \
dh-python \
python3-all \
python3-setuptools \
python3-pyqt6 \
python3-bs4 \
python3-requests \
python3-feedparser

- name: Scaffold Debian Control Files
run: |
mkdir -p debian
mkdir -p debian/source

echo "3.0 (native)" > debian/source/format

cat << 'EOF' > debian/rules
#!/usr/bin/make -f
%:
dh $@ --with python3 --buildsystem=pybuild
EOF
chmod +x debian/rules

cat << 'EOF' > debian/control
Source: uninews
Section: python
Priority: optional
Maintainer: George Apostolidis <geoapostolidis999@gmail.com>
Build-Depends: debhelper-compat (= 13), dh-python, python3-all, python3-setuptools
Standards-Version: 4.6.2
Homepage: https://github.com/open-source-uom/UniNews

Package: python3-uninews
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-pyqt6, python3-bs4, python3-requests, python3-feedparser
Description: University RSS and news reader desktop app
UniNews is a PyQt6 desktop application that aggregates university
RSS feeds and selected university news pages into one clean interface.
EOF

DEB_DATE=$(date -R)
DEB_AUTHOR=$(git log -1 --pretty=format:'%an <%ae>')

printf "uninews (0.1.0) noble; urgency=low\n\n * Auto-generated release.\n\n -- %s %s\n" "$DEB_AUTHOR" "$DEB_DATE" > debian/changelog

- name: Build Debian Packages
run: |
dpkg-buildpackage -us -uc -b
dpkg-buildpackage -us -uc -S

mkdir -p output_package
mv ../uninews_* output_package/

- name: Upload Package Artifacts
uses: actions/upload-artifact@v4
with:
name: uninews-packages
path: output_package/*

- name: Publish .deb to GitHub Releases
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: output_package/*.deb
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/UniNews.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/deployment.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading