-
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathaction.yml
More file actions
86 lines (83 loc) · 2.95 KB
/
action.yml
File metadata and controls
86 lines (83 loc) · 2.95 KB
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
name: "Build Action (orchestrated)"
description: "General build action repo; root is minimal and delegates to directory orchestrator based on discovery/ENV"
branding:
icon: 'box'
color: 'purple'
inputs:
build:
description: "Whether to run the build"
required: false
default: "true"
sign:
description: "Sign the build (delegated to stack’s signing flow)"
required: false
default: "false"
package:
description: "Upload artifacts and publish release on tags"
required: false
default: "true"
build-name:
description: "The name of the binary/app bundle"
required: true
build-platform:
description: "Platform to build for (e.g., linux/amd64, windows/amd64, darwin/universal)"
required: false
default: "darwin/universal"
app-working-directory:
description: "Root of the app being built"
required: false
default: "."
# Orchestrator controls (stack-agnostic)
AUTO_STACK:
description: "Allow root action to auto-select a stack based on discovery"
required: false
default: "true"
AUTO_SETUP:
description: "Allow orchestrators to auto-enable setup tools based on env toggles"
required: false
default: "true"
STACK:
description: "Explicit stack override (e.g., wails2)"
required: false
default: ""
runs:
using: "composite"
steps:
- name: Discovery
id: discovery
uses: host-uk/build/actions/discovery@dev
with:
working-directory: ${{ inputs.app-working-directory }}
- name: Delegate to directory orchestrator
id: dir_orch
uses: host-uk/build/actions@dev
with:
build: ${{ inputs.build }}
sign: ${{ inputs.sign }}
package: ${{ inputs.package }}
build-name: ${{ inputs.build-name }}
build-platform: ${{ inputs.build-platform }}
app-working-directory: ${{ inputs.app-working-directory }}
AUTO_STACK: ${{ inputs.AUTO_STACK }}
AUTO_SETUP: ${{ inputs.AUTO_SETUP }}
STACK: ${{ inputs.STACK }}
# Pass suggestion from discovery so orchestrator can skip re-scanning if it wants
PRIMARY_STACK_SUGGESTION: ${{ steps.discovery.outputs.PRIMARY_STACK_SUGGESTION }}
- name: Debug selected stack
shell: bash
run: echo "[DEBUG_LOG] (root) Orchestrator selected stack=${{ steps.dir_orch.outputs.SELECTED_STACK }}"
- name: Package & release
uses: host-uk/build/actions/package@dev
with:
package: ${{ inputs.package }}
build-name: ${{ inputs.build-name }}
os: ${{ steps.discovery.outputs.OS }}
arch: ${{ steps.discovery.outputs.ARCH }}
tag: ${{ steps.discovery.outputs.TAG }}
is-tag: ${{ steps.discovery.outputs.IS_TAG }}
short-sha: ${{ steps.discovery.outputs.SHORT_SHA }}
ref: ${{ steps.discovery.outputs.REF }}
outputs:
SELECTED_STACK:
description: "Stack selected by the orchestrator (via directory orchestrator)"
value: ${{ steps.dir_orch.outputs.SELECTED_STACK }}