linux build #243
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |