Skip to content

Commit

Permalink
Build deb packages in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Blaisot committed Oct 16, 2023
1 parent 9a52197 commit a7df643
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ name: Create releases
on:
push:
tags:
- '*.*.*' # Matching a version number like 1.4.19
- "*.*.*" # Matching a version number like 1.4.19
jobs:
publish_on_release:
runs-on: ubuntu-22.04
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Check code
go-version: "1.21.x"
- name: Checkout code
uses: actions/checkout@v4
- name: Build the binaries
run: |
Expand All @@ -31,3 +31,30 @@ jobs:
password: ${{ secrets.DOCKERHUB_SECRET }}
- name: Build and publish the cozy-app-dev image
run: scripts/release.sh
build_deb_packages:
strategy:
matrix:
os: [debian-10, debian-11, debian-12, ubuntu-20.04, ubuntu-22.04]
runs-on: ${{ matrix.os }}
needs: publish_on_release
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Checkout code
uses: actions/checkout@v4
- name: Install requirements
env:
SKIP_GO: "true"
run: |
scripts/packaging/installrequirements.sh
- name: Build package
run: |
scripts/packaging/buildpackage.sh
- name: Upload package to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag_name="${GITHUB_REF##*/}"
gh release upload "$tag_name" packages/*.deb

0 comments on commit a7df643

Please sign in to comment.