Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
135 lines (131 loc) · 4.8 KB
/
Copy pathaction.yml
File metadata and controls
135 lines (131 loc) · 4.8 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
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: "Self-Host Pro — Publish Release"
description: "Upload desktop app builds to Self-Host Pro and publish/promote release channels."
author: "Server Side Up"
branding:
icon: "upload-cloud"
color: "blue"
inputs:
command:
description: "'upload' an artifact, 'finalize' (publish + promote), or 'github-release' (mirror an on:release event)."
required: false
default: "upload"
base_url:
description: "Self-Host Pro base URL (your instance)."
required: false
default: "https://app.selfhostpro.com"
team:
description: "Team slug (the URL slug, not the display name)."
required: true
product:
description: "Product slug (the URL slug, not the display name)."
required: true
version:
description: "Release version. Defaults to the pushed git tag (leading 'v' stripped)."
required: false
default: ""
email:
description: "Account email (HTTP Basic username). Use a secret."
required: true
token:
description: "Team access token (HTTP Basic password). Use a secret."
required: true
file:
description: "Path to the binary (command=upload)."
required: false
default: ""
os:
description: "Operating system (command=upload): macos | windows | linux."
required: false
default: ""
arch:
description: "Architecture (command=upload): arm64 | x64 | x86 | universal (universal is macOS-only)."
required: false
default: ""
format:
description: "Optional artifact format override. Auto-derived from the file extension if omitted."
required: false
default: ""
signature:
description: "Update signature string. If empty, the action reads <file>.sig when present."
required: false
default: ""
notes:
description: "Release notes. Applied on the first upload of a version, or via finalize."
required: false
default: ""
publish:
description: "Publish the release (command=finalize)."
required: false
default: "true"
channel:
description: "Channel slug to promote to, e.g. stable (command=finalize)."
required: false
default: ""
max_retries:
description: "Number of retries on 429 / 5xx / transport errors."
required: false
default: "3"
dry_run:
description: "Print the composed request without sending it."
required: false
default: "false"
github_token:
description: "Token used to download release assets (command=github-release). Defaults to the workflow token."
required: false
default: "${{ github.token }}"
asset_map:
description: "Optional per-file overrides (command=github-release). One 'filename=os/arch' (or 'filename=skip') per line."
required: false
default: ""
latest_channel:
description: "Channel a non-prerelease (Latest) release is promoted to (command=github-release)."
required: false
default: "stable"
prerelease_channel:
description: "Channel a pre-release is promoted to (command=github-release). Set empty to publish without promoting."
required: false
default: "beta"
outputs:
version:
description: "Version acted upon."
value: "${{ steps.run.outputs.version }}"
release_status:
description: "draft | published."
value: "${{ steps.run.outputs.release_status }}"
artifact_id:
description: "Uploaded artifact id (command=upload)."
value: "${{ steps.run.outputs.artifact_id }}"
runs:
using: "composite"
steps:
- id: run
shell: bash
# Use the $GITHUB_ACTION_PATH env var (not the ${{ }} expression): on Windows
# the action path has backslashes, and substituting it as literal script text
# makes bash escape-process them ("D:\a\..." -> "D:a..."). A variable's value
# is not escape-processed, so the path survives. Invoke via bash so we don't
# depend on the +x bit either.
run: |
bash "$GITHUB_ACTION_PATH/entrypoint.sh"
env:
INPUT_COMMAND: "${{ inputs.command }}"
INPUT_BASE_URL: "${{ inputs.base_url }}"
INPUT_TEAM: "${{ inputs.team }}"
INPUT_PRODUCT: "${{ inputs.product }}"
INPUT_VERSION: "${{ inputs.version }}"
INPUT_EMAIL: "${{ inputs.email }}"
INPUT_TOKEN: "${{ inputs.token }}"
INPUT_FILE: "${{ inputs.file }}"
INPUT_OS: "${{ inputs.os }}"
INPUT_ARCH: "${{ inputs.arch }}"
INPUT_FORMAT: "${{ inputs.format }}"
INPUT_SIGNATURE: "${{ inputs.signature }}"
INPUT_NOTES: "${{ inputs.notes }}"
INPUT_PUBLISH: "${{ inputs.publish }}"
INPUT_CHANNEL: "${{ inputs.channel }}"
INPUT_MAX_RETRIES: "${{ inputs.max_retries }}"
INPUT_DRY_RUN: "${{ inputs.dry_run }}"
INPUT_GITHUB_TOKEN: "${{ inputs.github_token }}"
INPUT_ASSET_MAP: "${{ inputs.asset_map }}"
INPUT_LATEST_CHANNEL: "${{ inputs.latest_channel }}"
INPUT_PRERELEASE_CHANNEL: "${{ inputs.prerelease_channel }}"