-
Notifications
You must be signed in to change notification settings - Fork 29
114 lines (106 loc) · 3.79 KB
/
Copy pathrelease.yml
File metadata and controls
114 lines (106 loc) · 3.79 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
name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-[0-9]+"
jobs:
packages:
name: "Build packages"
runs-on: ubuntu-latest
if: github.event.base_ref == 'refs/heads/master'
steps:
- name: checkout repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- name: prepare runner
run: |
sudo apt-get update
sudo apt-get install -y flatpak-builder qemu-user-static binfmt-support
flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo snap install snapcraft --classic
sudo snap install lxd
sudo lxd init --auto
sudo usermod -a -G lxd $USER
sudo sysctl -w net.ipv4.conf.all.forwarding=1
if sudo iptables -nL DOCKER-USER >/dev/null 2>&1; then
sudo iptables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo iptables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
fi
if sudo ip6tables -nL DOCKER-USER >/dev/null 2>&1; then
sudo ip6tables -I DOCKER-USER -i lxdbr0 -j ACCEPT
sudo ip6tables -I DOCKER-USER -o lxdbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
fi
- name: install_deps
run: make install_deps
- name: cleanup source files
run: |
rm -rf source
df -h
- name: build_deb_x64
run: make build_deb_x64
- name: build_snap_x64
run: sg lxd -c 'make build_snap_x64'
- name: cleanup snap_x64
run: |
sg lxd -c 'snapcraft clean --use-lxd --platform amd64 || true'
df -h
- name: build_rpm_x64
run: make build_rpm_x64
- name: build_appimage_x64
run: make build_appimage_x64
- name: build_tar.xz_x64
run: make build_tar.xz_x64
- name: build_flatpak_x64
run: make build_flatpak_x64
- name: cleanup x64 build state
run: |
rm -rf artifacts/x64/linux*-unpacked artifacts/x64/__flatpak-*
flatpak uninstall --user --arch=x86_64 --unused --assumeyes --noninteractive || true
df -h
- name: build_deb_arm64
run: make build_deb_arm64
- name: build_snap_arm64
run: sg lxd -c 'make build_snap_arm64'
- name: cleanup snap_arm64
run: |
sg lxd -c 'snapcraft clean --use-lxd --platform arm64 || true'
df -h
- name: build_rpm_arm64
run: make build_rpm_arm64
- name: build_appimage_arm64
run: make build_appimage_arm64
- name: build_tar.xz_arm64
run: make build_tar.xz_arm64
- name: cleanup before build_flatpak_arm64
run: |
rm -rf artifacts/arm64/linux*-unpacked artifacts/arm64/__flatpak-*
df -h
- name: build_flatpak_arm64
run: make build_flatpak_arm64
- name: Get the version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
- name: Generate sha256
run: echo "$(sha256sum artifacts/{x64,arm64}/*.{deb,rpm,AppImage,tar.xz,snap,flatpak})" > sha256
- name: create release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.version }}
body: "Update to version ${{ env.version }}"
draft: false
files: |
artifacts/x64/*.deb
artifacts/x64/*.rpm
artifacts/x64/*.AppImage
artifacts/x64/*.snap
artifacts/x64/*.tar.xz
artifacts/x64/*.flatpak
artifacts/arm64/*.deb
artifacts/arm64/*.rpm
artifacts/arm64/*.AppImage
artifacts/arm64/*.snap
artifacts/arm64/*.tar.xz
artifacts/arm64/*.flatpak
sha256