This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #480 from MathieuBordere/ppabuild
packages: build, sign and push package from GHA.
- Loading branch information
Showing
1 changed file
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ on: | |
- push | ||
jobs: | ||
build: | ||
if: github.repository == 'canonical/raft' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -11,6 +12,8 @@ jobs: | |
- jammy | ||
- kinetic | ||
runs-on: ubuntu-20.04 | ||
environment: | ||
name: ppa | ||
steps: | ||
- name: Clone the repositories | ||
run: | | ||
|
@@ -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/ | ||
|
@@ -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 |