-
Notifications
You must be signed in to change notification settings - Fork 19
55 lines (47 loc) · 1.38 KB
/
freebsd.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
name: freebsd build
on:
workflow_call:
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, nzbget-freebsd]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build
run: |
BUILD_PARAMS="freebsd 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-freebsd-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-freebsd.run"
for FILE in *.run; do
[ -f $FILE ] || continue
NEW_FILE=${FILE/-bin-freebsd.run/$SUFFIX}
mv $FILE $NEW_FILE
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nzbget-freebsd-installers
path: build/*.run
retention-days: 5