-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (119 loc) · 4.39 KB
/
release.yml
File metadata and controls
137 lines (119 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Release
on:
push:
tags: ['v*']
jobs:
test:
name: Build & Test (ARM64)
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt6 & build tools
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
qt6-base-dev \
qt6-tools-dev \
cmake \
ninja-build \
can-utils
- name: Configure
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTS=ON
- name: Build
run: cmake --build build --parallel
- name: Run tests
run: ctest --test-dir build --output-on-failure --timeout 30
release:
name: Release (ARM64)
needs: test
runs-on: ubuntu-24.04-arm
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Qt6 & build tools
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
qt6-base-dev \
qt6-tools-dev \
cmake \
ninja-build
- name: Sync VERSION from tag
id: version
run: |
TAG="${{ github.ref_name }}" # e.g. v0.0.7
VER="${TAG#v}" # strip leading 'v' → 0.0.7
echo "$VER" > VERSION
echo "version=$VER" >> "$GITHUB_OUTPUT"
- name: Commit VERSION to main
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin main
git checkout main
echo "${{ steps.version.outputs.version }}" > VERSION
git add VERSION
git diff --staged --quiet || \
git commit -m "chore: bump VERSION to ${{ steps.version.outputs.version }} [skip ci]"
git push origin main
git checkout "${{ github.ref_name }}"
- name: Build release binary
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
- name: Prepare artifacts
run: |
cp build/apps/cluster/cluster cluster-arm64
cp build/apps/entertainment/entertainment entertainment-arm64
chmod +x cluster-arm64
chmod +x entertainment-arm64
echo "version=${{ steps.version.outputs.version }}" > build-info.txt
echo "commit=${{ github.sha }}" >> build-info.txt
echo "built=$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> build-info.txt
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: "v${{ steps.version.outputs.version }}"
body: |
## Cockpit Entertainment Cluster Unit v${{ steps.version.outputs.version }}
This release contains independent Raspberry Pi builds for the cluster display
and the entertainment/navigation display. Install one app per Pi.
### Cluster Pi
```bash
curl -L https://github.com/${{ github.repository }}/releases/latest/download/install.sh \
-o install.sh
curl -L https://github.com/${{ github.repository }}/releases/latest/download/cluster-arm64 \
-o cluster-arm64
sudo bash install.sh ./cluster-arm64
sudo reboot
```
### Entertainment Pi
```bash
curl -L https://github.com/${{ github.repository }}/releases/latest/download/entertainment-install.sh \
-o entertainment-install.sh
curl -L https://github.com/${{ github.repository }}/releases/latest/download/entertainment-arm64 \
-o entertainment-arm64
sudo bash entertainment-install.sh ./entertainment-arm64
sudo reboot
```
files: |
cluster-arm64
entertainment-arm64
build-info.txt
VERSION
scripts/install.sh
scripts/update.sh
scripts/cluster-kiosk.service
scripts/cluster-update.service
scripts/entertainment-install.sh
scripts/entertainment-update.sh
scripts/entertainment-kiosk.service
scripts/entertainment-update.service
generate_release_notes: true
make_latest: true