chl: make a new release #119
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build / publish APA | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'debian/changelog' | |
workflow_dispatch: # allow manual triggering | |
jobs: | |
build-debs: | |
runs-on: ${{ matrix.runner }} | |
name: ${{ matrix.architecture }} | |
strategy: | |
matrix: | |
include: | |
- architecture: amd64 | |
runner: ubuntu-latest | |
- architecture: armhf | |
runner: ubuntu-24.04-arm | |
- architecture: arm64 | |
runner: ubuntu-24.04-arm | |
- architecture: riscv64 | |
runner: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set up build environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y dpkg-dev debhelper | |
- name: Build deb and source packages | |
uses: jtdor/build-deb-action@v1 | |
env: | |
DEB_BUILD_OPTIONS: noautodbgsym | |
with: | |
host-arch: ${{ matrix.architecture }} | |
buildpackage-opts: --build=${{ matrix.architecture == 'amd64' && 'full' || 'any' }} | |
docker-image: debian:testing-20250407 | |
- name: "Upload artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts-${{ matrix.architecture }} | |
path: debian/artifacts/ | |
if-no-files-found: ignore | |
merge: | |
name: "Merge artifacts and publish" | |
needs: build-debs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: debian/artifacts/ | |
pattern: artifacts-* | |
merge-multiple: true | |
- name: Set up build environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y reprepro | |
- name: Import PRIMARY GPG key | |
id: import_gpg_primary | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_KEY3 }} | |
- name: Import SECONDARY GPG key | |
id: import_gpg_secondary | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_KEY4 }} | |
- name: Create distribution repository and commit to data branch | |
run: | | |
git checkout --orphan data | |
git rm -rf --cached . | |
git config --global user.name "github-actions" | |
git config --global user.email "[email protected]" | |
for file in debian/artifacts/*.changes; do reprepro -b debian/artifacts include current $file;done | |
reprepro -b debian/artifacts export | |
git add debian/artifacts/{pool,dists} | |
git diff --cached --quiet || git commit --allow-empty -m "Update published repository files" | |
git push --force --set-upstream origin data | |
- name: "publish repository to web server" | |
uses: peter-evans/repository-dispatch@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
event-type: "Generate directory" |