onlyoffice-document-server/.forgejo/workflows/release-build.yaml

77 lines
3.3 KiB
YAML
Raw Permalink Normal View History

2024-08-24 21:49:56 -04:00
on:
push:
tags:
- 'v*'
jobs:
release-build:
runs-on: x86_64
container:
image: ubuntu:22.04
env:
2025-04-16 21:16:50 -04:00
pkgver: 8.3.3
buildno: 21
2024-08-24 21:49:56 -04:00
qtver: 5.15.3
steps:
- name: Environment setup
run: |
cat /etc/os-release
apt-get update
2024-09-05 10:05:16 -04:00
apt-get install -y git make g++ bzip2 sudo patch python2 curl lsb-release p7zip-full qtbase5-dev debhelper clang-14 lld-14
2025-02-15 15:57:05 -05:00
# node version set in build_tools/scripts/build_server variable pkg_target
2024-08-24 21:49:56 -04:00
curl -sL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs
npm install -g pkg grunt grunt-cli
- name: Getting patches
uses: actions/checkout@v4
- name: Fetching sources
run: |
git clone https://github.com/ONLYOFFICE/DocumentServer --recursive -b v$pkgver build
git clone https://github.com/ONLYOFFICE/build_tools.git -b v$pkgver.$buildno build/build_tools
git clone https://github.com/ONLYOFFICE/document-server-integration -b v$pkgver.$buildno build/document-server-integration
git clone https://github.com/ONLYOFFICE/document-templates -b v$pkgver.$buildno build/document-templates
git clone https://github.com/ONLYOFFICE/onlyoffice.github.io build/onlyoffice.github.io
git clone https://github.com/ONLYOFFICE/document-server-package.git -b v$pkgver.$buildno build/document-server-package
- name: Applying patches
run: |
cd build
2024-09-05 10:05:16 -04:00
git apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/core_v8-use-system-clang.patch
git apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/disable-licensing-limits.patch
git apply -v --ignore-space-change --ignore-whitespace $GITHUB_WORKSPACE/core_common-officefileformatchecker2-add-limits-include.patch
2024-08-24 21:49:56 -04:00
- name: Development setup
run: |
mkdir -p build/build_tools/system_qt-$qtver/gcc_64
ln -s /usr/lib/x86_64-linux-gnu build/build_tools/system_qt-$qtver/gcc_64/lib
ln -s /usr/lib/x86_64-linux-gnu/qt5/bin build/build_tools/system_qt-$qtver/gcc_64/bin
ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins build/build_tools/system_qt-$qtver/gcc_64/plugins
cd build/build_tools/tools/linux
python2 ./deps.py
- name: Build server
run: |
cd build/build_tools
python2 ./configure.py --update 0 --module "server" --qt-dir $(pwd)/system_qt-$qtver
python2 ./make.py
- name: Build package
run: |
cd build/document-server-package
PRODUCT_VERSION=$pkgver BUILD_NUMBER=$buildno make deb
- name: Package upload
uses: forgejo/upload-artifact@v3
with:
name: documentserver-deb
path: build/document-server-package/deb/onlyoffice-documentserver_*.deb
release-deploy:
needs: [release-build]
runs-on: x86_64
container:
image: alpine:latest
steps:
- name: Setting up environment
run: apk add nodejs curl
- name: Package download
uses: forgejo/download-artifact@v3
- name: Package deployment
run: curl --user ${{ vars.FORGE_REPO_USER }}:${{ secrets.FORGE_REPO_PRIVKEY }} --upload-file */onlyoffice-documentserver_*.deb https://forge.ilot.io/api/packages/ilot/debian/pool/jammy/main/upload