Skip to content

Commit

Permalink
Test action build packages
Browse files Browse the repository at this point in the history
  • Loading branch information
isboston committed Nov 29, 2024
1 parent d29ef97 commit 718f642
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
- name: Set product version
run: |
PRODUCT_VERSION=$(grep -oP '\d+\.\d+\.\d+' <<< "${BRANCH_BUILDTOOLS//\//} ${BRANCH_CLIENT//\//} \
${BRANCH_SERVER//\//}" | head -n1 || echo "3.0.1")
echo "PRODUCT_VERSION=$PRODUCT_VERSION" >> $GITHUB_ENV
${BRANCH_SERVER//\//}" | head -n1")
echo "PRODUCT_VERSION=${PRODUCT_VERSION:-3.0.1}" >> $GITHUB_ENV
- name: Free Disk Space
run: |
Expand Down Expand Up @@ -153,11 +153,34 @@ jobs:
if: matrix.packageType == 'deb'
run: |
cd install/deb/
wget -q -O ./debian/source/buildtools.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-buildtools/archive/${BRANCH_BUILDTOOLS}.tar.gz"
wget -q -O ./debian/source/client.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-client/archive/${BRANCH_CLIENT}.tar.gz"
wget -q -O ./debian/source/server.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-server/archive/${BRANCH_SERVER}.tar.gz"
wget -q -O ./debian/source/DocStore.tar.gz "https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz"
wget -q -O ./debian/source/campaigns.tar.gz "https://github.com/ONLYOFFICE/ASC.Web.Campaigns/archive/master.tar.gz"
wget -q -O ./debian/source/plugins.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-plugins/archive/master.tar.gz"
rename -f -v "s/product([^\/]*)$/${PRODUCT_LOW}\$1/g" debian/*
find debian/ -type f -exec sed -i "s/{{product}}/${PRODUCT_LOW}/g" {} ';'
sed -i "s/{{package_header_tag_version}}/${PRODUCT_VERSION}.${BUILD_NUMBER}/g" debian/changelog debian/control
dpkg-buildpackage -uc -k${{ steps.gpg_step.outputs.fingerprint }}
- name: Build RPM Packages
if: matrix.packageType == 'rpm'
run: |
cd install/rpm/SPECS
wget -q -O ./SOURCES/buildtools.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-buildtools/archive/${BRANCH_BUILDTOOLS}.tar.gz"
wget -q -O ./SOURCES/client.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-client/archive/${BRANCH_CLIENT}.tar.gz"
wget -q -O ./SOURCES/server.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-server/archive/${BRANCH_SERVER}.tar.gz"
wget -q -O ./SOURCES/DocStore.tar.gz "https://github.com/ONLYOFFICE/document-templates/archive/main/community-server.tar.gz"
wget -q -O ./SOURCES/campaigns.tar.gz "https://github.com/ONLYOFFICE/ASC.Web.Campaigns/archive/master.tar.gz"
wget -q -O ./SOURCES/plugins.tar.gz "https://github.com/ONLYOFFICE/$PRODUCT-plugins/archive/master.tar.gz"
mv ./SOURCES/product.rpmlintrc ./SOURCES/${PRODUCT_LOW}.rpmlintrc
sed -i -e '/BuildRequires/d' product.spec
rpmbuild -D "packager Ascensio System SIA <[email protected]>" \
-D "_topdir $(pwd)" \
-D "version ${PRODUCT_VERSION}" \
-D "release ${BUILD_NUMBER}" -ba product.spec
- name: Sign RPM Packages
if: matrix.packageType == 'rpm'
Expand Down
2 changes: 1 addition & 1 deletion install/deb/debian/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
###!/bin/sh -e
####!/bin/sh -e

set -e

Expand Down
2 changes: 1 addition & 1 deletion install/rpm/SPECS/SOURCES/product.rpmlintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Ignoring node_modules errors due to lack of ability to influence them
### Ignoring node_modules errors due to lack of ability to influence them
addFilter(r'node_modules')

# Packages use a non-standard user and group for our project directories, but the user and group are created in %pre common
Expand Down

0 comments on commit 718f642

Please sign in to comment.