@@ -10,10 +10,9 @@ permissions:
1010
1111jobs :
1212 release :
13- name : Release pushed tag
1413 runs-on : ubuntu-22.04
1514 steps :
16- - name : Create release
15+ - name : Create release (draft)
1716 env :
1817 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1918 tag : ${{ github.ref_name }}
2322 --title="$tag" \
2423 --draft \
2524 --generate-notes
26- build-binary :
27- name : Build (Linux)
25+
26+ build :
27+ name : Build (${{ matrix.distro.name }})
2828 runs-on : ubuntu-latest
29+ strategy :
30+ fail-fast : false
31+ matrix :
32+ distro :
33+ - { name: "ubuntu", image: "ubuntu:latest", suffix: "linux-ubuntu-amd64" }
34+ - { name: "debian", image: "debian:latest", suffix: "linux-debian-amd64" }
35+
36+ container :
37+ image : ${{ matrix.distro.image }}
38+
2939 env :
3040 BIN_NAME : icon
3141
3848 with :
3949 python-version : " 3.13"
4050
51+ - name : Install system deps
52+ run : |
53+ apt-get update
54+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
55+ openssh-client git ca-certificates curl
56+
4157 - name : Install uv
4258 run : |
4359 curl -fsSL https://astral.sh/uv/install.sh | sh
@@ -48,11 +64,14 @@ jobs:
4864 ssh-private-key : |
4965 ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5066
51- - name : Add gitlab.phys.ethz.ch to known hosts
67+ - name : Configure SSH for GitLab
68+ env :
69+ SSH_KEY : ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5270 run : |
53- mkdir -p ~/.ssh
54- chmod 700 ~/.ssh
55- ssh-keyscan gitlab.phys.ethz.ch >> ~/.ssh/known_hosts
71+ mkdir -p ~/.ssh && chmod 700 ~/.ssh
72+ ssh-keyscan gitlab.phys.ethz.ch > ~/.ssh/known_hosts
73+ chmod 600 ~/.ssh/known_hosts
74+ ssh -o StrictHostKeyChecking=yes -T git@gitlab.phys.ethz.ch -vv || true
5675
5776 - name : Sync build dependencies
5877 env :
@@ -66,15 +85,12 @@ jobs:
6685 run : uv run pyinstaller icon.spec
6786
6887 - name : Package artifact
69- shell : bash
7088 run : |
7189 mkdir -p out
72- cp "dist/${BIN_NAME}" "out/${BIN_NAME}-linux-amd64"
90+ cp "dist/${BIN_NAME}" "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
91+ chmod +x "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
7392
7493 - name : Upload binaries to GitHub Release
7594 env :
7695 tag : ${{ github.ref_name }}
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78- run : |
79- gh release upload "$tag" out/** \
80- --repo="$GITHUB_REPOSITORY"
96+ run : gh release upload "$tag" out/**
0 commit comments