@@ -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,16 @@ jobs:
4863 ssh-private-key : |
4964 ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5065
51- - name : Add gitlab.phys.ethz.ch to known hosts
66+ - name : Configure SSH for GitLab
67+ env :
68+ SSH_KEY : ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5269 run : |
53- mkdir -p ~/.ssh
54- chmod 700 ~/.ssh
70+ eval "$(ssh-agent -s)"
71+ mkdir -p ~/.ssh && chmod 700 ~/.ssh
5572 ssh-keyscan gitlab.phys.ethz.ch >> ~/.ssh/known_hosts
73+ echo "$SSH_KEY" > ~/.ssh/id_ed25519
74+ chmod 600 ~/.ssh/id_ed25519
75+ ssh-add ~/.ssh/id_ed25519
5676
5777 - name : Sync build dependencies
5878 env :
@@ -66,15 +86,12 @@ jobs:
6686 run : uv run pyinstaller icon.spec
6787
6888 - name : Package artifact
69- shell : bash
7089 run : |
7190 mkdir -p out
72- cp "dist/${BIN_NAME}" "out/${BIN_NAME}-linux-amd64"
91+ cp "dist/${BIN_NAME}" "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
92+ chmod +x "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
7393
7494 - name : Upload binaries to GitHub Release
7595 env :
7696 tag : ${{ github.ref_name }}
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78- run : |
79- gh release upload "$tag" out/** \
80- --repo="$GITHUB_REPOSITORY"
97+ run : gh release upload "$tag" out/**
0 commit comments