-
Notifications
You must be signed in to change notification settings - Fork 69
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 #345 from cole-miller/v2-packages
v2 packages
- Loading branch information
Showing
1 changed file
with
16 additions
and
9 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 |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Build PPA source packages | |
on: | ||
push: | ||
branches: | ||
- master | ||
- v2 | ||
jobs: | ||
build: | ||
if: github.repository == 'canonical/go-dqlite' | ||
|
@@ -18,10 +18,16 @@ jobs: | |
environment: | ||
name: ppa | ||
steps: | ||
- name: Clone the repositories | ||
run: | | ||
git clone https://github.com/canonical/go-dqlite | ||
git clone https://github.com/canonical/dqlite-ppa -b go-dqlite --depth 1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
repository: canonical/dqlite-ppa | ||
ref: go-dqlite-v2 | ||
path: dqlite-ppa | ||
|
||
- name: Setup dependencies | ||
run: | | ||
|
@@ -46,17 +52,18 @@ jobs: | |
DEBEMAIL: "[email protected]" | ||
TARGET: ${{ matrix.target }} | ||
run: | | ||
cp -R dqlite-ppa/debian go-dqlite/ | ||
cd go-dqlite/ | ||
cp -R dqlite-ppa/debian . | ||
go mod vendor | ||
VERSION="$(git describe --tags | sed -e "s/^v//" -e "s/-/+git/")" | ||
dch --create \ | ||
--distribution ${TARGET} \ | ||
--package go-dqlite \ | ||
--package go-dqlite-v2 \ | ||
--newversion ${VERSION}~${TARGET}1 \ | ||
"Automatic build from Github" | ||
debuild -S -sa -d -k${{ vars.PPA_PUBLIC_KEY }} | ||
- name: Upload to Launchpad | ||
run: | | ||
dput -U -u ppa:dqlite/dev *.changes | ||
cd .. | ||
shopt -s globstar | ||
dput -U -u ppa:dqlite/dev **/*.changes |