Skip to content

add arch link folder. #51

add arch link folder.

add arch link folder. #51

Workflow file for this run

name: Build repository release
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
create:
tags:
- "v*"
push:
branches: [ dev ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os-version: ["debian:buster", "debian:bullseye", "debian:bookworm", "ubuntu:noble", "ubuntu:jammy", "ubuntu:focal"]
arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v4
- name: Extract OS Flavor and Version
id: extract-os
run: |
os_version="${{ matrix.os-version }}"
echo "flavor=${os_version%%:*}" >> $GITHUB_ENV
echo "version=${os_version##*:}" >> $GITHUB_ENV
- uses: jtdor/build-deb-action@v1
env:
DEB_BUILD_OPTIONS: noautodbgsym
with:
docker-image: "${{ matrix.os-version }}"
host-arch: "${{ matrix.arch }}"
setup-hook: |
os_version="${{ matrix.os-version }}"
flavor=${os_version%%:*}
arch="${{ matrix.arch }}"
if [ "$flavor" = "ubuntu" ] && [ "$arch" = "arm64" ]; then
sed -i 's,[a-z]*.ubuntu.com,ports.ubuntu.com,' /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources
sed -i 's,/ubuntu/ ,/ubuntu-ports/ ,' /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources
cat /etc/apt/sources.list
fi
if [ "$arch" = "arm64" ]; then
dpkg --add-architecture arm64
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev:arm64 tinycdb:arm64 libmilter-dev:aarch64 libcdb-dev:arm64
echo "export DEB_LDFLAGS_APPEND='-L/usr/lib/aarch64-linux-gnu'" | sudo tee /etc/dpkg/buildflags.d/custom.conf
echo "export DEB_BUILD_ARCH=arm64" | sudo tee /etc/dpkg/buildflags.d/custom.conf
fi
extra-build-deps: devscripts git dpkg-cross
before-build-hook: "dch --local ~${{ env.version }} 'GitHub build for ${{ matrix.os-version }}'"
buildpackage-opts: --build=binary --no-sign -d
- name: Upload deb files
uses: actions/upload-artifact@v4
with:
name: "packages-${{ env.version }}-${{ matrix.arch }}"
path: ./debian/artifacts/*
merge-artefacts:
runs-on: ubuntu-latest
needs: build
steps:
- name: debian-packages
uses: actions/upload-artifact/merge@v4
add_release:
name: Add package to release
needs: merge-artefacts
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: merged-artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./*.deb
add_repo:
runs-on: ubuntu-latest
needs: build
strategy:
max-parallel: 1
matrix:
os-version: ["buster", "bullseye", "bookworm", "noble", "jammy", "focal"]
arch: ["amd64", "arm64"]
steps:
- uses: actions/download-artifact@v4
with:
name: "packages-${{ matrix.os-version }}-${{ matrix.arch }}"
- name: Add ${{ matrix.arch }}/${{ matrix.os-version }} release
uses: smeinecke/apt-repo-action@master
with:
github_token: ${{ github.token }}
repo_supported_arch: |
amd64
arm64
repo_supported_version: |
stretch
buster
bullseye
bookworm
noble
jammy
focal
file: |
*~${{ matrix.os-version }}*.deb
file_target_version: ${{ matrix.os-version }}
private_key: ${{ secrets.APT_SIGNING_KEY }}
public_key: ${{ vars.APT_PUBLIC_KEY }}
key_passphrase: ""