-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
36 lines (36 loc) · 1.11 KB
/
action.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
name: 'Build C++ Library'
description: 'Build a typical STOL C++ library'
inputs:
build-options:
description: 'Options to pass to the build script'
required: false
working-folder:
description: 'Working folder to build in'
required: false
build-wrapper:
description: 'Build wrapper for the build script'
required: false
package-version-suffix:
description: 'Suffix use in the package version'
required: false
runs:
using: 'composite'
steps:
- name: Run build script
shell: bash
run: |
if [ ! -z "${{ inputs.working-folder }}" ]; then
echo "Using working folder ${{ inputs.working-folder }}"
cd ${{ inputs.working-folder }}
fi
pwd
ls
if [ -f build.sh ]; then
if [ ! -z "${{ inputs.package-version-suffix }}" ]; then
PACKAGE_VERSION_SUFFIX_ARG="-s ${{ inputs.package-version-suffix }}"
fi
${{ inputs.build-wrapper }} ./build.sh ${{ inputs.build-options }} ${PACKAGE_VERSION_SUFFIX_ARG}
else
echo "No build.sh script found. Exiting..."
exit 1
fi