Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
127 lines (121 loc) · 5.48 KB
/
Copy pathaction.yml
File metadata and controls
127 lines (121 loc) · 5.48 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
name: Linear Release
description: Sync deployments with Linear releases
author: Linear
branding:
icon: tag
color: blue
inputs:
access_key:
description: Linear pipeline access key for authentication. Store this in GitHub Secrets.
required: true
command:
description: Command to run. Use "sync" to create/update a release, "complete" to mark it done, or "update" to change deployment stage.
required: false
default: sync
name:
description: Custom release name. Applied to the targeted release for "sync", "complete", and "update".
required: false
description:
description: Release description. Applied to the targeted release for "sync", "complete", and "update" when non-empty. Supports multiline text.
required: false
version:
description: Release version identifier. Maps to CLI --release-version (e.g., "v1.2.3").
required: false
release_version:
description: Alias for "version". Maps to CLI --release-version.
required: false
stage:
description: Deployment stage such as "staging" or "production". Required when command is "update".
required: false
include_paths:
description: Filter commits by file paths using comma-separated globs (e.g., "apps/web/**,packages/**"). Useful for monorepos.
required: false
include_subjects:
description: Filter commits whose subject (first line) matches a regular expression (e.g., "[A-Z]{2,}-[0-9]+"). Composes with include_paths.
required: false
issue_pattern:
description: 'Extract issue identifiers captured by group 1 of a regular expression from commit subjects (e.g., "\[([A-Z]+-\d+)\]"). Additive to the built-in detection.'
required: false
no_branch_ref_detection:
description: 'When "true", disable issue detection from git branch refs during sync. Commit-message detection, including source branches in merge messages, remains enabled.'
required: false
default: "false"
base_ref:
description: "Override the sync scan base. Exclusive: scans <base_ref>..HEAD."
required: false
links:
description: Links to attach to the targeted release. Use one link per line. Each link must be either an absolute URL or "Label=URL".
required: false
documents:
description: Documents to attach to the targeted release. One per line as "[Title=]path/to/file.md" (title inferred from the filename if omitted). Existing documents on the release with the same title are updated.
required: false
release_notes:
description: Path to a markdown file used as the release notes for this release.
required: false
dry_run:
description: 'When "true", scan commits and call read-only Linear APIs but skip the create/update mutations. Logs the action that would have been taken; no release is created or modified.'
required: false
default: "false"
log_level:
description: Log verbosity. Use "quiet" for errors only or "verbose" for detailed progress. Omit for default output.
required: false
timeout:
description: Maximum time in seconds to wait for the command to complete. Defaults to 60.
required: false
cli_version:
description: Linear Release CLI version to install (e.g., "v0.18.0"). Set to "latest" to always use the newest CLI.
required: false
default: v0.18.0
github_token:
description: github.com token used to authenticate release metadata and downloads. Defaults to the workflow's automatic token on github.com, which avoids the lower anonymous API rate limit. On GitHub Enterprise the automatic token is not valid for github.com, so requests are anonymous unless you pass a github.com token.
required: false
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
outputs:
release-id:
description: The Linear release ID
value: ${{ steps.run.outputs.release-id }}
release-name:
description: The Linear release name
value: ${{ steps.run.outputs.release-name }}
release-version:
description: The Linear release version
value: ${{ steps.run.outputs.release-version }}
release-url:
description: URL to the Linear release
value: ${{ steps.run.outputs.release-url }}
runs:
using: composite
steps:
- name: Install Linear Release CLI
shell: bash
run: bash "${{ github.action_path }}/install.sh"
env:
CLI_VERSION: ${{ inputs.cli_version }}
GITHUB_TOKEN: ${{ inputs.github_token }}
- name: Run Linear Release
id: run
shell: bash
run: bash "${{ github.action_path }}/run.sh"
env:
LINEAR_ACCESS_KEY: ${{ inputs.access_key }}
COMMAND: ${{ inputs.command }}
INPUT_NAME: ${{ inputs.name }}
INPUT_DESCRIPTION: ${{ inputs.description }}
INPUT_VERSION: ${{ inputs.version }}
INPUT_RELEASE_VERSION: ${{ inputs.release_version }}
INPUT_STAGE: ${{ inputs.stage }}
INPUT_INCLUDE_PATHS: ${{ inputs.include_paths }}
INPUT_INCLUDE_SUBJECTS: ${{ inputs.include_subjects }}
INPUT_ISSUE_PATTERN: ${{ inputs.issue_pattern }}
INPUT_NO_BRANCH_REF_DETECTION: ${{ inputs.no_branch_ref_detection }}
INPUT_BASE_REF: ${{ inputs.base_ref }}
INPUT_LINKS: ${{ inputs.links }}
INPUT_DOCUMENTS: ${{ inputs.documents }}
INPUT_RELEASE_NOTES: ${{ inputs.release_notes }}
INPUT_DRY_RUN: ${{ inputs.dry_run }}
INPUT_LOG_LEVEL: ${{ inputs.log_level }}
INPUT_TIMEOUT: ${{ inputs.timeout }}
- name: Cleanup CLI binary
if: always()
shell: bash
run: rm -f "${{ github.action_path }}/linear-release"