-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (44 loc) · 1.55 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Release actions
on:
release:
types: [published]
permissions:
contents: write
jobs:
build-deb:
name: Build .deb packages for ${{ matrix.distro.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro:
- name: Debian 12
codename: bookworm
image: debian:bookworm-slim
extra-repos: |
deb http://deb.debian.org/debian bookworm-backports main
- name: Ubuntu 24.04
codename: noble
image: ubuntu:noble
extra-repos: |
deb http://archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
uses: jtdor/build-deb-action@v1
with:
buildpackage-opts: -b -us -uc
docker-image: ${{ matrix.distro.image }}
extra-repos: ${{ matrix.distro.extra-repos }}
- name: Upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd debian/artifacts
_files=($(find . -type f -name 'mimic*.deb' -printf '%P\n') $(find . -type f -name 'mimic*.ddeb' -printf '%P\n'))
for _f in ${_files[@]}; do
sudo mv "$_f" "${{ matrix.distro.codename }}_$_f";
sha256sum "${{ matrix.distro.codename }}_$_f" > "../${{ matrix.distro.codename }}_$_f.sha256"
done
gh release upload $(sed 's|refs/tags/||' <(echo ${{ github.ref }})) ${_files[@]/#/${{ matrix.distro.codename }}_} ../*.sha256