Skip to content

Commit e3bf431

Browse files
committed
action: create releases for debian and ubuntu
1 parent 2eba329 commit e3bf431

File tree

1 file changed

+27
-13
lines changed

1 file changed

+27
-13
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ permissions:
1010

1111
jobs:
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,9 +22,20 @@ 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

@@ -38,6 +48,12 @@ jobs:
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+
ssh git
56+
4157
- name: Install uv
4258
run: |
4359
curl -fsSL https://astral.sh/uv/install.sh | sh
@@ -48,10 +64,11 @@ 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
71+
mkdir -p ~/.ssh && chmod 700 ~/.ssh
5572
ssh-keyscan gitlab.phys.ethz.ch >> ~/.ssh/known_hosts
5673
5774
- name: Sync build dependencies
@@ -66,15 +83,12 @@ jobs:
6683
run: uv run pyinstaller icon.spec
6784

6885
- name: Package artifact
69-
shell: bash
7086
run: |
7187
mkdir -p out
72-
cp "dist/${BIN_NAME}" "out/${BIN_NAME}-linux-amd64"
88+
cp "dist/${BIN_NAME}" "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
89+
chmod +x "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
7390
7491
- name: Upload binaries to GitHub Release
7592
env:
7693
tag: ${{ github.ref_name }}
77-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
run: |
79-
gh release upload "$tag" out/** \
80-
--repo="$GITHUB_REPOSITORY"
94+
run: gh release upload "$tag" out/**

0 commit comments

Comments
 (0)