forked from raphaelscholle/OpenHD-imager
-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (66 loc) · 2.4 KB
/
Ubuntu_Multi.yml
File metadata and controls
76 lines (66 loc) · 2.4 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
name: OpenHD Image Writer (multi-distro)
on:
push:
branches:
- "master"
- "dev-release"
- "release"
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
distro:
- { name: noble, container: 'ubuntu:noble' }
- { name: lunar, container: 'ubuntu:lunar' }
- { name: jammy, container: '' }
container: ${{ matrix.distro.container }}
steps:
- name: Init env
run: |
echo "DT=$(date +'%Y-%m-%d_%H%M')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
if [ "${{ matrix.distro.name }}" = "lunar" ]; then
sed -i 's|http://archive.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list
sed -i 's|http://security.ubuntu.com/ubuntu|http://old-releases.ubuntu.com/ubuntu|g' /etc/apt/sources.list
fi
if [ "${{ matrix.distro.name }}" != "jammy" ]; then
apt update
apt install -y git sudo
fi
- uses: actions/checkout@v5
- name: Build .deb
run: |
sudo apt update
sudo apt upgrade -y
sudo apt install -y --no-install-recommends \
libgnutls28-dev build-essential devscripts debhelper cmake git libarchive-dev libcurl4-openssl-dev \
qtbase5-dev qtbase5-dev-tools qtdeclarative5-dev libqt5svg5-dev qttools5-dev libssl-dev \
qml-module-qtquick2 qml-module-qtquick-controls2 qml-module-qtquick-layouts \
qml-module-qtquick-templates2 qml-module-qtquick-window2 qml-module-qtgraphicaleffects
mkdir build
mv `ls -A | grep -v "build"` build
cd build
debuild -uc -us
cd ..
- name: Upload to GitHub
uses: actions/upload-artifact@v4
with:
name: "OpenHD Image Writer (${{ matrix.distro.name }})"
path: |
*.deb
if-no-files-found: error
- name: Push to Cloudsmith
if: github.ref_name == 'release' || github.ref_name == 'dev-release'
id: push
uses: cloudsmith-io/action@master
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "deb"
owner: "openhd"
repo: ${{ github.ref_name }}
distro: "ubuntu"
release: "${{ matrix.distro.name }}"
republish: "true"
file: "*.deb"