From bcc61dc6eb62234947dd794a80b3e084a054164a Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sun, 25 Oct 2020 02:08:15 +0300 Subject: Add github workflow for debian packaging Builds can be triggered manually (`workflow_dispatch`) and by pushing a tagged release (`v*.*.*`) - There's a plain build done in an amd64 ubuntu-latest image and tar'ed - There's an amd64 ubuntu-latest deb package - There's an amd64 debian buster deb package made in a docker container Release is defined in the RELEASE_VERSION env var in the workflow configuration but must also be changed in the debian/ metadata. --- .github/workflows/docker-debian/action.yml | 4 ++++ .github/workflows/docker-debian/debian-dockerfile | 8 ++++++++ .github/workflows/docker-debian/entrypoint.sh | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 .github/workflows/docker-debian/action.yml create mode 100644 .github/workflows/docker-debian/debian-dockerfile create mode 100755 .github/workflows/docker-debian/entrypoint.sh (limited to '.github/workflows/docker-debian') diff --git a/.github/workflows/docker-debian/action.yml b/.github/workflows/docker-debian/action.yml new file mode 100644 index 00000000..d510199b --- /dev/null +++ b/.github/workflows/docker-debian/action.yml @@ -0,0 +1,4 @@ +name: 'docker' +runs: + using: 'docker' + image: 'debian-dockerfile' diff --git a/.github/workflows/docker-debian/debian-dockerfile b/.github/workflows/docker-debian/debian-dockerfile new file mode 100644 index 00000000..147449a0 --- /dev/null +++ b/.github/workflows/docker-debian/debian-dockerfile @@ -0,0 +1,8 @@ +# Container image that runs your code +FROM debian:buster + +# Copies your code file from your action repository to the filesystem path `/` of the container +COPY entrypoint.sh /entrypoint.sh + +# Code file to execute when the docker container starts up (`entrypoint.sh`) +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/workflows/docker-debian/entrypoint.sh b/.github/workflows/docker-debian/entrypoint.sh new file mode 100755 index 00000000..94eb7e53 --- /dev/null +++ b/.github/workflows/docker-debian/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/sh -xv + +apt-get update -qq -y +apt-get install -y -qq --no-install-recommends cmake libsdl2-dev libssl-dev libpcre3-dev zlib1g-dev libunistring-dev libmpg123-dev debhelper dh-make devscripts fakeroot git build-essential +git submodule sync + +git archive --format=tar.gz --prefix=lagrange-${RELEASE_VERSION}/ HEAD >lagrange-${RELEASE_VERSION}.tar.gz +tar -xvzf lagrange-${RELEASE_VERSION}.tar.gz +ln -s lagrange-${RELEASE_VERSION}.tar.gz lagrange_${RELEASE_VERSION}.orig.tar.gz +cd lagrange-${RELEASE_VERSION} +debuild +cd .. +mkdir -p artifacts +mv *deb artifacts/ + -- cgit v1.2.3