forked from nexodus-io/nexodus
-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (57 loc) · 2.06 KB
/
ppa-build.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
name: deb packaging and PPA push
on:
workflow_dispatch:
jobs:
build_and_upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: ./.github/actions/setup-go-env
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y devscripts debhelper make
- name: Make binaries
run: |
make dist/nexctl-linux-arm64
make dist/nexctl-linux-amd64
make dist/nexd-linux-arm64
make dist/nexd-linux-amd64
- name: Import GPG key
run: |
echo "$PPA_GPG_PRIVATE_KEY" | gpg --batch --import -
echo "$PPA_GPG_PUBLIC_KEY" | gpg --batch --import -
env:
PPA_GPG_PRIVATE_KEY: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
PPA_GPG_PUBLIC_KEY: ${{ secrets.PPA_GPG_PUBLIC_KEY }}
- name: Create symbolic link
run: ln -s contrib/debian debian
- name: Update changelog
run: |
FULL_DATE=$(date '+%a, %d %b %Y %H:%M:%S %z')
DATE=$(date '+%Y.%m.%d')
{
echo "nexodus ($DATE) jammy; urgency=medium";
echo "";
echo " * Debian ppa/deb packaging.";
echo "";
echo " -- brentsalisbury <[email protected]> $FULL_DATE";
echo "";
} > debian/changelog
- name: Build deb files
run: debuild -us -uc -S
- name: Sign and upload the deb file
run: |
set -ex
echo "Configuring gpg..."
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
DATE=$(date '+%Y.%m.%d')
echo "Using DATE: $DATE"
echo "Running debsign..."
debsign --re-sign -k [email protected] -p "gpg --batch --passphrase $PPA_GPG_PASSPHRASE" "../nexodus_${DATE}_source.changes"
echo "Uploading with dput..."
dput -f ppa:nexodus/ppa "../nexodus_${DATE}_source.changes"
env:
PPA_GPG_PASSPHRASE: ${{ secrets.PPA_GPG_PASSPHRASE }}