Skip to content
Merged
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
62 changes: 62 additions & 0 deletions .github/workflows/publish_to_PPA.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Publish to Launchpad PPA

on:
push:
tags:
- 'v*' # Triggers on tags like v1.0.0, v1.2.3-1, etc.
workflow_dispatch: # Allows manual trigger from GitHub UI

jobs:
build-and-deploy:
runs-on: ubuntu-latest

env:
# UPDATE THESE VARIABLES
PPA_TARGET: "ppa:your-launchpad-handle/your-ppa-name"
MAINTAINER_NAME: "Apostolos Chalis"
MAINTAINER_EMAIL: "achalis@csd.auth.gr"

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Debian packaging tools
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
devscripts \
debhelper \
dh-make \
dput \
gnupg

- name: Import GPG key for signing
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.chalis_ppa_key }}
passphrase: ${{ secrets.chalis_ppa_key }}

- name: Configure Git and Debian environment
run: |
git config user.name "$MAINTAINER_NAME"
git config user.email "$MAINTAINER_EMAIL"
export DEBFULLNAME="$MAINTAINER_NAME"
export DEBEMAIL="$MAINTAINER_EMAIL"

- name: Build Debian Source Package
run: |
# Clean untracked files that might interfere with debuild
git clean -fdx -e .github

# Build source package (-S) and include upstream tarball (-sa)
# -k specifies the key ID/email to use for signing
debuild -S -sa -k"$MAINTAINER_EMAIL"

- name: Upload to Launchpad PPA via dput
run: |
# Find the generated .changes file in the parent directory
CHANGES_FILE=$(ls ../*_source.changes | head -n 1)

echo "Uploading $CHANGES_FILE to $PPA_TARGET..."
dput -f "$PPA_TARGET" "$CHANGES_FILE"
Loading