Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: create debian 13 package #389

Merged
merged 2 commits into from
Feb 16, 2025
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
83 changes: 83 additions & 0 deletions .github/workflows/build-umu-debian-13.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: UMU Deb Build - Debian 13
on:
workflow_call:
inputs:
version:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest
container:
image: debian:trixie
volumes:
- /proc:/proc
options: --privileged -it

steps:
- name: Update APT Cache
run: apt update -y

- name: Install build dependencies
run: apt install -y dh-make dpkg-dev git

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git safe directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- name: Extract Version and SHA
run: |
VERSION=$(git describe --tags --abbrev=0 || echo "unknown")
echo $VERSION

# Get current commit SHA
COMMIT_SHA=$(git rev-parse HEAD)
echo $COMMIT_SHA

# Store values in environment file
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "COMMIT_SHA=$COMMIT_SHA" >> $GITHUB_ENV

# Always insert latest version into Makefile.in
sed -i "s|^VERSION := .*$|VERSION := ${VERSION}|g" Makefile.in

- name: Initialize submodules
run: git submodule update --init --recursive

- name: Copy debian packaging folder to the repository root
run: cp -rvf ./packaging/deb/debian ./debian

- name: Setup dh_make quilt files
run: |
sed -re 's|(umu-launcher \()[1-9.]+(-1\).*$)|\1${{ env.VERSION }}\2|' -i ./debian/changelog
LOGNAME=root dh_make --createorig -y -l -p umu-launcher_${{ env.VERSION }} || true

- name: Install apt build dependencies
run: apt build-dep -y ./

- name: Build
run: dpkg-buildpackage --no-sign

- name: Move and rename DEB files to upload artifact path
run: |
mkdir -p results
mv ../python3-umu-launcher_${{ env.VERSION }}-1_amd64.deb \
results/python3-umu-launcher_${{ env.VERSION }}-1_amd64_debian-13.deb
mv ../umu-launcher_${{ env.VERSION }}-1_all.deb \
results/umu-launcher_${{ env.VERSION }}-1_all_debian-13.deb

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: python3-umu-launcher_${{ env.VERSION }}-1_amd64_debian-13.deb
path: results/python3-umu-launcher_${{ env.VERSION }}-1_amd64_debian-13.deb

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: umu-launcher_${{ env.VERSION }}-1_all_debian-13.deb
path: results/umu-launcher_${{ env.VERSION }}-1_all_debian-13.deb
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build and upload development artifacts

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
version:
Expand Down Expand Up @@ -34,6 +34,13 @@ jobs:
with:
version: ${{ needs.version.outputs.version }}

debian13-build:
name: Debian 13 Build
uses: ./.github/workflows/build-umu-debian-13.yml
needs: version
with:
version: ${{ needs.version.outputs.version }}

ubuntu-noble-build:
name: Ubuntu 24.04 Build
uses: ./.github/workflows/build-umu-ubuntu-noble.yml
Expand All @@ -47,4 +54,3 @@ jobs:
needs: version
with:
version: ${{ needs.version.outputs.version }}