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

Automatically build Debian packages and publish to PPA #394

Merged
merged 3 commits into from
Jul 20, 2020
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
79 changes: 79 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Packages
on: [push, pull_request]

jobs:
build-deb:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro: [ubuntu-groovy, ubuntu-focal, ubuntu-eoan]
steps:
- uses: actions/checkout@v2

# Determine which PPA we should upload to
- name: PPA
id: ppa
run: |
if [[ $REF == refs/tags* ]]
then
echo "::set-output name=ppa::kiwixteam/release"
else
echo "::set-output name=ppa::kiwixteam/dev"
fi
env:
REF: ${{ github.ref }}

- uses: legoktm/gh-action-auto-dch@master
with:
fullname: Kiwix builder
email: release+launchpad@kiwix.org
distro: ${{ matrix.distro }}

- uses: legoktm/gh-action-build-deb@ubuntu-groovy
if: matrix.distro == 'ubuntu-groovy'
name: Build package for ubuntu-groovy
id: build-ubuntu-groovy
with:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}

- uses: legoktm/gh-action-build-deb@ubuntu-focal
if: matrix.distro == 'ubuntu-focal'
name: Build package for ubuntu-focal
id: build-ubuntu-focal
with:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}

- uses: legoktm/gh-action-build-deb@ubuntu-eoan
if: matrix.distro == 'ubuntu-eoan'
name: Build package for ubuntu-eoan
id: build-ubuntu-eoan
with:
args: --no-sign
ppa: ${{ steps.ppa.outputs.ppa }}

- uses: actions/upload-artifact@v2
with:
name: Packages for ${{ matrix.distro }}
path: output

- uses: legoktm/gh-action-dput@master
name: Upload dev package
# Only upload on pushes to master
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && startswith(matrix.distro, 'ubuntu-')
with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
repository: ppa:kiwixteam/dev
packages: output/*_source.changes

- uses: legoktm/gh-action-dput@master
name: Upload release package
# Only upload on pushes to master or tag
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && startswith(matrix.distro, 'ubuntu-')
with:
gpg_key: ${{ secrets.LAUNCHPAD_GPG }}
repository: ppa:kiwixteam/release
packages: output/*_source.changes

5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kiwix-tools (0.0.0) unstable; urgency=medium

* Initial release

-- Kunal Mehta <legoktm@debian.org> Mon, 13 Jul 2020 17:21:11 -0700
27 changes: 27 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Source: kiwix-tools
Section: utils
Priority: optional
Maintainer: Kiwix team <kiwix@kiwix.org>
Build-Depends: debhelper-compat (= 12),
libkiwix-dev (>= 9.3.0~),
libmicrohttpd-dev,
meson,
pkg-config,
zlib1g-dev
Standards-Version: 4.5.0
Homepage: https://github.com/kiwix/kiwix-tools
Rules-Requires-Root: no

Package: kiwix-tools
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: collection of Kiwix tools
kiwix-tools is a collection of various command-line tools used to help
users interact with and manage ZIM files. It includes:
* kiwix-serve is a standalone HTTP server for serving ZIM files
over the network.
* kiwix-manage allows one to manage the content of the Kiwix library (an
XML file listing available ZIM files).
* kiwix-read allows for reading ZIM files from the command-line.
* kiwix-search allows one to find articles in a ZIM file using fulltext
search patterns.
1 change: 1 addition & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See COPYING in the repository root.
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/make -f
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)