Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #480 from MathieuBordere/ppabuild
Browse files Browse the repository at this point in the history
packages: build, sign and push package from GHA.
  • Loading branch information
Mathieu Borderé authored Sep 18, 2023
2 parents 51b2b74 + 93d31ff commit deb91e7
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
- push
jobs:
build:
if: github.repository == 'canonical/raft'
strategy:
fail-fast: false
matrix:
Expand All @@ -11,6 +12,8 @@ jobs:
- jammy
- kinetic
runs-on: ubuntu-20.04
environment:
name: ppa
steps:
- name: Clone the repositories
run: |
Expand All @@ -20,12 +23,24 @@ jobs:
- name: Setup dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -qq debhelper devscripts
sudo apt-get install -qq debhelper devscripts gnupg
- 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]"
DEBEMAIL: "[email protected]"
TARGET: ${{ matrix.target }}
run: |
cp -R dqlite-ppa/debian raft/
Expand All @@ -36,15 +51,8 @@ jobs:
--package raft \
--newversion ${VERSION}~${TARGET}1 \
"Automatic build from Github"
debuild -S -sa -us -uc -d
debuild -S -sa -d -k${{ vars.PPA_PUBLIC_KEY }}
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: debian-${{ matrix.target }}
if-no-files-found: error
path: |
*.buildinfo
*.changes
*.dsc
*.tar.*
- name: Upload to Launchpad
run: |
dput -U -u ppa:dqlite/dev *.changes

0 comments on commit deb91e7

Please sign in to comment.