-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
58 lines (54 loc) · 1.96 KB
/
.gitlab-ci.yml
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
cache:
paths:
- build-appimage/*.AppImage
build_appimage:
stage: build
image: debian:bookworm
script:
- apt-get update
- apt-get -y install binutils cmake coreutils desktop-file-utils fakeroot fuse g++ git gtk-update-icon-cache
libgdk-pixbuf2.0-dev openjdk-17-jre-headless patchelf python3-pip python3-setuptools squashfs-tools strace
util-linux xxd zsync
- pip3 install git+https://github.com/AppImageCrafters/appimage-builder.git --break-system-packages
- pip3 install -r requirements.txt --break-system-packages
- sh build.sh build-appimage
- cd build-appimage
- make install DESTDIR=AppDir -j$(nproc)
- install -D ../packaging/spicygoat.desktop AppDir/usr/share/applications/spicygoat.desktop
- install -D ../packaging/minecraft.png AppDir/usr/share/icons/hicolor/512x512/apps/minecraft.png
- appimage-builder --recipe ../packaging/AppImageBuilder.yml --skip-test
artifacts:
paths:
- build-appimage/*.AppImage
.build_windows:
stage: build
tags: [windows-shell]
script:
- C:\msys64\msys2_shell.cmd -mingw64 -defterm -here -full-path -no-start build.sh
artifacts:
paths:
- build/spicygoat.exe
.package_archlinux:
stage: build
when: on_success
image: archlinux:base-devel
script:
- cd packaging/archlinux
- rm -f *.pkg.tar.zst
- chmod o+w .
- ln -s ../../build/spicygoat .
- su -s /bin/sh -c 'makepkg -d -f' nobody
.deploy:
stage: deploy
when: on_success
script:
- 'eval $(ssh-agent -s)'
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- scp packaging/archlinux/spicygoat-$CI_PIPELINE_IID-1-x86_64.pkg.tar.zst root@arch.kinrar.io:/srv/repo/kinrar/x86_64
- ssh root@arch.kinrar.io "cd /srv/repo/kinrar/x86_64; repo-add -n -R -p kinrar.db.tar.gz spicygoat-$CI_PIPELINE_IID-1-x86_64.pkg.tar.zst"
only:
- master