Skip to content

linux build

linux build #255

Workflow file for this run

name: linux build
on:
workflow_call:
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, nzbget-linux]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: |
BUILD_PARAMS="linux bin installer"
if [ "$GITHUB_REF_NAME" == "develop" ] || [ "$GITHUB_REF_NAME" == "main" ]; then
BUILD_PARAMS="$BUILD_PARAMS debug release"
else
BUILD_PARAMS="$BUILD_PARAMS release"
fi
if [ "$GITHUB_REF_NAME" != "main" ]; then
BUILD_PARAMS="$BUILD_PARAMS testing"
fi
bash linux/build-nzbget.sh $BUILD_PARAMS
- name: Upload full build log on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: nzbget-linux-build-log
path: build/*/build.log
retention-days: 5
- name: Rename build artifacts
if: github.ref_name != 'main' && github.ref_name != 'develop'
run: |
cd build
SUFFIX="-${GITHUB_REF_NAME/\//-}-bin-linux.run"
for FILE in *.run; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/-bin-linux.run/$SUFFIX}
mv $FILE $NEW_FILE
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-linux-installers
path: build/*.run
retention-days: 5