@@ -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 }}
@@ -23,20 +22,36 @@ jobs:
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
3242 steps :
3343 - name : Checkout
3444 uses : actions/checkout@v4
3545
36- - name : Set up Python
37- uses : actions/setup-python@v5
38- with :
39- python-version : " 3.13"
46+ # Basic toolchain inside the container
47+ - name : Install system deps
48+ run : |
49+ apt-get update
50+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
51+ python3 python3-venv python3-pip git openssh-client ca-certificates curl \
52+ upx-ucl
53+ python3 -V
54+ pip3 --version
4055
4156 - name : Install uv
4257 run : |
@@ -48,11 +63,17 @@ jobs:
4863 ssh-private-key : |
4964 ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5065
51- - name : Add gitlab.phys.ethz.ch to known hosts
66+ # Manual ssh-agent (works in containers)
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
71+ eval "$(ssh-agent -s)"
72+ mkdir -p ~/.ssh && chmod 700 ~/.ssh
5573 ssh-keyscan gitlab.phys.ethz.ch >> ~/.ssh/known_hosts
74+ printf '%s\n' "$SSH_KEY" > ~/.ssh/id_ed25519
75+ chmod 600 ~/.ssh/id_ed25519
76+ ssh-add ~/.ssh/id_ed25519
5677
5778 - name : Sync build dependencies
5879 env :
@@ -66,15 +87,12 @@ jobs:
6687 run : uv run pyinstaller icon.spec
6788
6889 - name : Package artifact
69- shell : bash
7090 run : |
7191 mkdir -p out
72- cp "dist/${BIN_NAME}" "out/${BIN_NAME}-linux-amd64"
92+ cp "dist/${BIN_NAME}" "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
93+ chmod +x "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
7394
7495 - name : Upload binaries to GitHub Release
7596 env :
7697 tag : ${{ github.ref_name }}
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78- run : |
79- gh release upload "$tag" out/** \
80- --repo="$GITHUB_REPOSITORY"
98+ run : gh release upload "$tag" out/**
0 commit comments