summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2021-07-12 19:03:14 +0100
committerGitHub <noreply@github.com>2021-07-12 19:03:14 +0100
commit5f2848f379ebefd100fc0a1ac5a034f447137f60 (patch)
tree15fb704208d794a8770533bf48cfe5ed6f30fa1e /.github/workflows
parentFix README rst (diff)
downloadsynapse-5f2848f379ebefd100fc0a1ac5a034f447137f60.tar.xz
build debs in GHA (#10247)
GHA workflow to build the debs
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/debs.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/debs.yml b/.github/workflows/debs.yml
new file mode 100644
index 0000000000..e03a419426
--- /dev/null
+++ b/.github/workflows/debs.yml
@@ -0,0 +1,44 @@
+# GitHub actions workflow which builds the debian packages.
+
+name: Debs
+
+on:
+  push:
+    branches: ["develop", "release-*"]
+
+permissions:
+  contents: read
+
+jobs:
+  # first get the list of distros to build for.
+  get-distros:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - uses: actions/setup-python@v2
+      - id: set-distros
+        run: |
+          echo "::set-output name=distros::$(scripts-dev/build_debian_packages --show-dists-json)"
+    # map the step outputs to job outputs
+    outputs:
+      distros: ${{ steps.set-distros.outputs.distros }}
+
+  # now build the packages with a matrix build.
+  build-debs:
+    needs: get-distros
+    name: "Build .deb packages"
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        distro: ${{ fromJson(needs.get-distros.outputs.distros) }}
+
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          path: src
+      - uses: actions/setup-python@v2
+      - run: ./src/scripts-dev/build_debian_packages "${{ matrix.distro }}"
+      - uses: actions/upload-artifact@v2
+        with:
+          name: packages
+          path: debs/*