Skip to content

Commit a5ca01e

Browse files
committed
Add workflow to build source package
1 parent 0ed4730 commit a5ca01e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/submit.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
workflow_dispatch:
6+
7+
name: Submit to launchpad
8+
9+
jobs:
10+
Build:
11+
runs-on: ubuntu-24.04
12+
name: 'Sign and upload to Launchpad'
13+
14+
steps:
15+
- name: Prepare system
16+
run: |
17+
sudo apt-get update
18+
sudo add-apt-repository -y "ppa:marutter/rrutter4.0"
19+
sudo apt-get install -y git gnupg curl devscripts equivs gdebi-core
20+
mkdir -p ~/.gnupg
21+
echo "default-cache-ttl 46000" >> ~/.gnupg/gpg-agent.conf
22+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
23+
echo "allow-preset-passphrase" >> ~/.gnupg/gpg-agent.conf
24+
echo "DEBUILD_TGZ_CHECK=no" >> ~/.devscripts
25+
curl -sSL $GPG_KEY > private.pgp
26+
export GPG_TTY=$(tty)
27+
gpg --batch --yes --import private.pgp
28+
rm -f private.pgp
29+
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Install build dependencies
34+
run: |
35+
sudo mk-build-deps -i
36+
37+
- name: Build and sign source package
38+
run: |
39+
debuild -S -i -I -p"gpg --batch --yes --passphrase $GPG_PASS --pinentry-mode loopback"
40+
sed -i.bak 's|noble|jammy|g' debian/changelog
41+
debuild -S -i -I -p"gpg --batch --yes --passphrase $GPG_PASS --pinentry-mode loopback"
42+
env:
43+
GPG_KEY: ${{ secrets.GPG_KEY }}
44+
GPG_PASS: ${{ secrets.GPG_PASS }}
45+
46+
- name: Upload to launchpad
47+
run: |
48+
cd ..
49+
dput ppa:opencpu/opencpu-2.2 *.changes

0 commit comments

Comments
 (0)