-
Notifications
You must be signed in to change notification settings - Fork 17
104 lines (95 loc) · 2.81 KB
/
Copy pathrun-linear-release.yml
File metadata and controls
104 lines (95 loc) · 2.81 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
name: Run Release Management
on:
workflow_call:
inputs:
action:
description: "Action to perform"
required: true
type: string
name:
description: "Release name"
required: false
type: string
version:
description: "Release version"
required: false
type: string
secrets:
LINEAR_RELEASE_MANAGEMENT_ACCESS_KEY:
required: true
workflow_dispatch:
inputs:
action:
description: "Action"
required: true
type: choice
options:
- sync
- complete
name:
description: "Release name"
required: false
type: string
version:
description: "Release version"
required: false
type: string
permissions:
contents: read
jobs:
sync:
name: Sync issues to release
if: inputs.action == 'sync'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
persist-credentials: false
- name: Download CLI
env:
GH_TOKEN: ${{ github.token }}
run: gh release download --repo linear/linear-release --pattern "linear-release-linux-x64" --output linear-release
- name: Sync issues
env:
LINEAR_ACCESS_KEY: ${{ secrets.LINEAR_RELEASE_MANAGEMENT_ACCESS_KEY }}
RELEASE_NAME: ${{ inputs.name }}
RELEASE_VERSION: ${{ inputs.version }}
run: |
chmod +x linear-release
args=()
if [ -n "$RELEASE_NAME" ]; then
args+=("--name=$RELEASE_NAME")
fi
if [ -n "$RELEASE_VERSION" ]; then
args+=("--release-version=$RELEASE_VERSION")
fi
./linear-release sync "${args[@]}"
complete:
name: Complete release
if: inputs.action == 'complete'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
persist-credentials: false
- name: Download CLI
env:
GH_TOKEN: ${{ github.token }}
run: gh release download --repo linear/linear-release --pattern "linear-release-linux-x64" --output linear-release
- name: Complete release
env:
LINEAR_ACCESS_KEY: ${{ secrets.LINEAR_RELEASE_MANAGEMENT_ACCESS_KEY }}
RELEASE_NAME: ${{ inputs.name }}
RELEASE_VERSION: ${{ inputs.version }}
run: |
chmod +x linear-release
args=()
if [ -n "$RELEASE_NAME" ]; then
args+=("--name=$RELEASE_NAME")
fi
if [ -n "$RELEASE_VERSION" ]; then
args+=("--release-version=$RELEASE_VERSION")
fi
./linear-release complete "${args[@]}"