diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index b2a5400c..2f9c5e16 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -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: "dqlitebot@lists.canonical.com" 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