mirror of https://github.com/kiwix/kiwix-tools.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.5 KiB
83 lines
2.5 KiB
name: Packages
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build-deb:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
distro:
|
|
- ubuntu-kinetic
|
|
- ubuntu-jammy
|
|
- ubuntu-focal
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# 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-jammy
|
|
if: matrix.distro == 'ubuntu-jammy'
|
|
name: Build package for ubuntu-jammy
|
|
id: build-ubuntu-jammy
|
|
with:
|
|
args: --no-sign
|
|
ppa: ${{ steps.ppa.outputs.ppa }}
|
|
|
|
- uses: legoktm/gh-action-build-deb@ubuntu-kinetic
|
|
if: matrix.distro == 'ubuntu-kinetic'
|
|
name: Build package for ubuntu-kinetic
|
|
id: build-ubuntu-kinetic
|
|
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: actions/upload-artifact@v3
|
|
with:
|
|
name: Packages for ${{ matrix.distro }}
|
|
path: output
|
|
|
|
- uses: legoktm/gh-action-dput@master
|
|
name: Upload dev package
|
|
# Only upload on pushes to git default branch
|
|
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' && 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
|
|
|