Skip to content

Commit 543164f

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

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/release.yml

Lines changed: 21 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

@@ -48,10 +58,11 @@ jobs:
4858
ssh-private-key: |
4959
${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5060
51-
- name: Add gitlab.phys.ethz.ch to known hosts
61+
- name: Configure SSH for GitLab
62+
env:
63+
SSH_KEY: ${{ secrets.GITLAB_TIQI_RPC_SSH_KEY }}
5264
run: |
53-
mkdir -p ~/.ssh
54-
chmod 700 ~/.ssh
65+
mkdir -p ~/.ssh && chmod 700 ~/.ssh
5566
ssh-keyscan gitlab.phys.ethz.ch >> ~/.ssh/known_hosts
5667
5768
- name: Sync build dependencies
@@ -66,15 +77,12 @@ jobs:
6677
run: uv run pyinstaller icon.spec
6778

6879
- name: Package artifact
69-
shell: bash
7080
run: |
7181
mkdir -p out
72-
cp "dist/${BIN_NAME}" "out/${BIN_NAME}-linux-amd64"
82+
cp "dist/${BIN_NAME}" "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
83+
chmod +x "out/${BIN_NAME}-${{ matrix.distro.suffix }}"
7384
7485
- name: Upload binaries to GitHub Release
7586
env:
7687
tag: ${{ github.ref_name }}
77-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78-
run: |
79-
gh release upload "$tag" out/** \
80-
--repo="$GITHUB_REPOSITORY"
88+
run: gh release upload "$tag" out/**

0 commit comments

Comments
 (0)