Skip to content

Release by matrix

Release by matrix #6

Workflow file for this run

name: Release by matrix
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
ubuntu:
name: Build on ${{matrix.container }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container: ['ubuntu:jammy', 'ubuntu:noble']
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
apt update -qq
apt install -qqy build-essential libcurl4-openssl-dev libjansson-dev linux-libc-dev libtool autoconf git bzip2 clang-format
apt install -qqy glibc-source gcc make libcurl4-gnutls-dev unzip debhelper dh-make devscripts cdbs clang libcriterion-dev
- name: Add octopass user
run: |
useradd -m -s /bin/bash octopass
echo "LOGNAME=octopass" >> $GITHUB_ENV
echo "USER=octopass" >> $GITHUB_ENV
- name: Create package
run: |
make deb
- name: Release
run: |
curl -OL https://github.com/tcnksm/ghr/releases/download/v0.17.0/ghr_v0.17.0_linux_amd64.tar.gz
tar -xzf ghr_v0.17.0_linux_amd64.tar.gz
mv ghr_v0.17.0_linux_amd64/ghr /usr/bin/ghr
make github_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
debian:
name: Build on ${{matrix.container }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container: ['debian:buster', 'debian:bullseye']
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
apt update -qq
apt install -qqy glibc-source gcc make libcurl4-gnutls-dev libjansson-dev bzip2 unzip debhelper dh-make devscripts cdbs clang apt-utils
- name: Set LOGNAME and USER to environment
run: |
echo "LOGNAME=root" >> $GITHUB_ENV
echo "USER=root" >> $GITHUB_ENV
- name: Create package
run: |
make deb
- name: Release
run: |
curl -OL https://github.com/tcnksm/ghr/releases/download/v0.17.0/ghr_v0.17.0_linux_amd64.tar.gz
tar -xzf ghr_v0.17.0_linux_amd64.tar.gz
mv ghr_v0.17.0_linux_amd64/ghr /usr/bin/ghr
make github_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}