-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
115 lines (113 loc) · 4.41 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# action.yml
name: 'Build 4D'
author: 'Eric Marchand'
branding:
icon: 'package'
color: 'blue'
description: 'Build 4D code'
inputs:
project:
description: 'Project to build'
required: false
targets:
description: "If not defined, only a check syntax is done. Possible values: \"x86_64_generic\", \"arm64_macOS_lib\" if macOS. (some shortcut all, current, available)"
required: false
default: ""
type-inference:
description: "String \"all\": Type all variables,\n \"locals\": Process and interprocess are typed,\n \"none\": \"All variables are typed\""
required: false
default: "none"
generate-symbols:
description: "true to generate symbol information in the .symbols returned object"
required: false
default: "False"
generate-typing-methods:
description: "\"reset\" or \"append\" to generate typing methods.\nIf value is \"append\", existing variable declarations won't be modified (compiler window behavior).\nIf value is \"reset\" existing variable declarations are removed beforehand."
required: false
default: ""
ignore-warnings:
description: "Never display compilation warnings."
required: false
default: "False"
fail-on-warning:
description: "Failed on warnings."
required: false
default: "False"
actions:
description: "One or more among \"build\",\"pack\",\"sign\",\"archive\""
required: false
default: ""
output-directory:
description: "Directory to output build. Default is \"build\""
required: false
default: ""
sign-certificate:
description: "Name of the certificate to use. Mandatory to sign on macOS."
required: false
default: ""
sign-files:
description: "List of file paths to sign too relative to base folder"
required: false
default: ""
entitlements-file:
description: "Path of entitlement files to sign (if not defined use default one)"
required: false
default: ""
archive-name:
description: "Define name of the archive produced with action 'archive'. (Default is 4d project name with space replaced by -)"
required: false
default: ""
product-line:
description: 'tool4d product line'
required: false
default: "20.x"
version:
description: 'tool4d version'
required: false
default: "20.3"
build:
description: 'tool4d build number'
required: false
default: "latest"
token:
description: 'if needed a token to download'
required: false
runs:
using: 'composite'
steps:
- id: setup
name: Setup environment
shell: bash
run: |
WORKINK_DIRECTORY="${{ github.workspace }}"
WORKINK_DIRECTORY=$(echo $WORKINK_DIRECTORY|sed -e 's/\\/\\\\/g') # escape workspace for json
echo "WORKINK_DIRECTORY=$WORKINK_DIRECTORY" >> $GITHUB_ENV
if [[ -z "${RUNNER_DEBUG}" ]]; then
echo "RUNNER_DEBUG=0" >> $GITHUB_ENV
else
echo "RUNNER_DEBUG=$RUNNER_DEBUG" >> $GITHUB_ENV
fi
MY_RUNNER_TMP=$(echo "${{ runner.temp }}" | sed 's/\\/\//g')
echo "TMP=$MY_RUNNER_TMP"
echo "ERROR_FLAG=$MY_RUNNER_TMP/error_flag" >> $GITHUB_ENV
- id: tool4d
uses: 4d/tool4d-action@v2
env:
GITHUB_THIS_ACTION_PATH: ${{ github.action_path }}
with:
product-line: "${{ inputs.product-line }}"
version: "${{ inputs.version }}"
build: "${{ inputs.build }}"
token: "${{ inputs.token }}"
project: "${{env.GITHUB_THIS_ACTION_PATH}}/Project/actions.4DProject"
user-param: '{"path": "${{ inputs.project }}", "workingDirectory": "${{ env.WORKINK_DIRECTORY }}",
"actions":"${{ inputs.actions }}",
"outputDirectory":"${{ inputs.output-directory }}",
"signCertificate":"${{ inputs.sign-certificate }}",
"signFiles":"${{ inputs.sign-files }}",
"entitlementsFile":"${{ inputs.entitlements-file }}",
"archiveName":"${{ inputs.archive-name }}",
"options": "{ \"generateTypingMethods\": \"${{ inputs.generate-typing-methods }}\", \"generateSymbols\": \"${{ inputs.generate-symbols }}\", \"typeInferences\": \"${{ inputs.type-inference }}\", \"targets\": \"${{ inputs.targets }}\" }" ,
"debug": ${{ env.RUNNER_DEBUG }}, "ignoreWarnings": "${{ inputs.ignore-warnings }}", "failOnWarning": "${{ inputs.fail-on-warning }}", "errorFlag": "${{ env.ERROR_FLAG }}" }'
startup-method: main
error-flag: "${{env.ERROR_FLAG}}"