-
Notifications
You must be signed in to change notification settings - Fork 225
71 lines (65 loc) · 1.84 KB
/
packages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build PPA source packages
on:
push:
branches:
- 'lts-1.17.x'
jobs:
build:
if: github.repository == 'canonical/dqlite'
strategy:
fail-fast: false
matrix:
target:
- focal
- jammy
- noble
- oracular
runs-on: ubuntu-20.04
environment:
name: ppa
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/checkout@v4
with:
repository: canonical/dqlite-ppa
ref: dqlite-lts
path: dqlite-ppa
- name: Setup dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq debhelper devscripts gnupg
# Note for future maintainers: the secret key should be stored
# in the GHA secret in ASCII-armored form, and must not be
# password-protected.
- name: Setup GPG signing key
env:
PPA_SECRET_KEY: ${{ secrets.PPA_SECRET_KEY }}
run: |
echo "$PPA_SECRET_KEY" > private-key.asc
gpg --import --batch private-key.asc
- name: Delete GPG signing key file
if: always()
run: |
rm -f private-key.asc
- name: Build source package
env:
DEBFULLNAME: "Github Actions"
DEBEMAIL: "[email protected]"
TARGET: ${{ matrix.target }}
run: |
cp -R dqlite-ppa/debian .
VERSION="$(git describe --tags | sed -e "s/^v//" -e "s/-/+git/")"
dch --create \
--distribution ${TARGET} \
--package dqlite1.17 \
--newversion ${VERSION}~${TARGET}1 \
"Automatic build from Github"
debuild -S -sa -d -k${{ vars.PPA_PUBLIC_KEY }}
- name: Upload to Launchpad
run: |
cd ..
shopt -s globstar
dput -U -u ppa:dqlite/dev **/*.changes