@@ -74,20 +74,26 @@ jobs:
74
74
- id : pr
75
75
name : Create a release PR (for updating the version file)
76
76
run : |
77
- renote pr \
78
- --owner longhorn \
79
- --repo longhorn \
80
- --branch ${{ steps.var.outputs.branch }} \
81
- --tag ${{ steps.var.outputs.tag }} \
82
- --longhorn-chart-repo charts \
83
- --longhorn-repos longhorn-manager \
84
- --longhorn-repos longhorn-engine \
85
- --longhorn-repos longhorn-instance-manager \
86
- --longhorn-repos longhorn-share-manager \
87
- --longhorn-repos backing-image-manager \
88
- --longhorn-repos longhorn-ui \
89
- --longhorn-repos cli:longhorn-cli \
77
+ common_args=(
78
+ --owner longhorn
79
+ --repo longhorn
80
+ --branch "${{ steps.var.outputs.branch }}"
81
+ --tag "${{ steps.var.outputs.tag }}"
82
+ --longhorn-chart-repo charts
83
+ --longhorn-repos longhorn-manager
84
+ --longhorn-repos longhorn-engine
85
+ --longhorn-repos longhorn-instance-manager
86
+ --longhorn-repos longhorn-share-manager
87
+ --longhorn-repos backing-image-manager
88
+ --longhorn-repos longhorn-ui
90
89
--merge
90
+ )
91
+
92
+ if [ "${{ steps.var.outputs.branch }}" != "v1.6.x" ]; then
93
+ common_args+=(--longhorn-repos cli:longhorn-cli)
94
+ fi
95
+
96
+ renote pr "${common_args[@]}"
91
97
92
98
- id : artifact
93
99
name : Collect artifacts
@@ -97,103 +103,129 @@ jobs:
97
103
- id : tag
98
104
name : Create a tag for each release repo
99
105
run : |
100
- renote tag \
101
- --owner longhorn \
102
- --branch ${{ steps.var.outputs.branch }} \
103
- --tag ${{ steps.var.outputs.tag }} \
104
- --create-version-file \
105
- --version-file-repos longhorn-manager \
106
- --version-file-repos longhorn-engine \
107
- --version-file-repos longhorn-instance-manager \
108
- --version-file-repos longhorn-share-manager \
109
- --version-file-repos backing-image-manager \
110
- --version-file-repos longhorn-ui \
111
- --version-file-repos cli \
112
- --repos longhorn \
106
+ common_args=(
107
+ --owner longhorn
108
+ --branch "${{ steps.var.outputs.branch }}"
109
+ --tag "${{ steps.var.outputs.tag }}"
110
+ --create-version-file
111
+ --version-file-repos longhorn-manager
112
+ --version-file-repos longhorn-engine
113
+ --version-file-repos longhorn-instance-manager
114
+ --version-file-repos longhorn-share-manager
115
+ --version-file-repos backing-image-manager
116
+ --version-file-repos longhorn-ui
117
+ --repos longhorn
113
118
--force
119
+ )
120
+
121
+ if [ "${{ steps.var.outputs.branch }}" != "v1.6.x" ]; then
122
+ common_args+=(--version-file-repos cli)
123
+ fi
124
+
125
+ renote tag "${common_args[@]}"
114
126
115
127
- id : changelog-prev-tag
116
128
name : Create a changelog from the most previous tag
117
129
run : |
130
+ repos=(
131
+ longhorn-manager
132
+ longhorn-engine
133
+ longhorn-instance-manager
134
+ longhorn-share-manager
135
+ backing-image-manager
136
+ longhorn-ui
137
+ longhorn
138
+ )
139
+
140
+ if [ "${{ steps.var.outputs.branch }}" != "v1.6.x" ]; then
141
+ repos+=(cli)
142
+ fi
143
+
118
144
output=$(renote changelog \
119
145
--owner longhorn \
120
146
--branch ${{ steps.var.outputs.branch }} \
121
147
--tag ${{ steps.var.outputs.tag }} \
122
- --repos longhorn-manager \
123
- --repos longhorn-engine \
124
- --repos longhorn-instance-manager \
125
- --repos longhorn-share-manager \
126
- --repos backing-image-manager \
127
- --repos longhorn-ui \
128
- --repos cli \
129
- --repos longhorn)
148
+ $(printf -- '--repos %s ' "${repos[@]}"))
130
149
131
150
echo "$output"
132
151
echo "$output" > ./changelog-prev-tag.md
133
152
134
153
- id : changelog
135
154
name : Create a changelog from the last release
136
155
run : |
156
+ repos=(
157
+ longhorn-manager
158
+ longhorn-engine
159
+ longhorn-instance-manager
160
+ longhorn-share-manager
161
+ backing-image-manager
162
+ longhorn-ui
163
+ longhorn
164
+ )
165
+
166
+ if [ "${{ steps.var.outputs.branch }}" != "v1.6.x" ]; then
167
+ repos+=(cli)
168
+ fi
169
+
137
170
output=$(renote changelog \
138
171
--log-level error \
139
172
--owner longhorn \
140
- --branch ${{ steps.var.outputs.branch }} \
141
- --tag ${{ steps.var.outputs.tag }} \
142
- --prev-tag ${{ steps.var.outputs.prev_tag }} \
143
- --repos longhorn-manager \
144
- --repos longhorn-engine \
145
- --repos longhorn-instance-manager \
146
- --repos longhorn-share-manager \
147
- --repos backing-image-manager \
148
- --repos longhorn-ui \
149
- --repos cli \
150
- --repos longhorn)
173
+ --branch "${{ steps.var.outputs.branch }}" \
174
+ --tag "${{ steps.var.outputs.tag }}" \
175
+ --prev-tag "${{ steps.var.outputs.prev_tag }}" \
176
+ $(printf -- '--repos %s ' "${repos[@]}"))
151
177
152
178
echo "$output"
153
179
echo "$output" > ./changelog.md
154
180
155
181
- id : release
156
182
name : Create a release
157
183
run : |
158
- renote release \
159
- --owner longhorn \
160
- --repo longhorn \
161
- --branch ${{ steps.var.outputs.branch }} \
162
- --tag ${{ steps.var.outputs.tag }} \
163
- --milestone ${{ steps.var.outputs.milestone }} \
164
- --pre-note ./assets/release-preview/pre-note.md \
165
- --note-contributors innobead \
166
- --since-days 365 \
167
- --exclude-labels "kind/test" \
168
- --exclude-labels "area/infra" \
169
- --exclude-labels "area/ci" \
170
- --exclude-labels "area/qa" \
171
- --exclude-labels "wontfix" \
172
- --exclude-labels "duplicated" \
173
- --exclude-labels "invalid" \
174
- --exclude-labels "release/task" \
175
- --note-section-labels "highlight" \
176
- --note-section-labels "kind/feature" \
177
- --note-section-labels "kind/improvement" \
178
- --note-section-labels "kind/bug" \
179
- --note-section-labels "area/performance" \
180
- --note-section-labels "area/resilience" \
181
- --note-section-labels "area/stability" \
182
- --note-section-labels "area/scalability" \
183
- --note-section-labels "area/benchmark" \
184
- --pre-hook ./scripts/check-images-ready.sh \
185
- --pre-hook-args "longhornio/longhorn-manager:${{ steps.var.outputs.tag }}" \
186
- --pre-hook-args "longhornio/longhorn-engine:${{ steps.var.outputs.tag }}" \
187
- --pre-hook-args "longhornio/longhorn-instance-manager:${{ steps.var.outputs.tag }}" \
188
- --pre-hook-args "longhornio/longhorn-share-manager:${{ steps.var.outputs.tag }}" \
189
- --pre-hook-args "longhornio/backing-image-manager:${{ steps.var.outputs.tag }}" \
190
- --pre-hook-args "longhornio/longhorn-ui:${{ steps.var.outputs.tag }}" \
191
- --pre-hook-args "longhornio/longhorn-cli:${{ steps.var.outputs.tag }}" \
192
- --artifacts ./longhorn.yaml \
193
- --artifacts ./longhorn-images.txt \
194
- --artifacts ./charts.tar.gz \
195
- --artifacts ./changelog.md \
196
- --artifacts ./changelog-prev-tag.md \
197
- --artifacts ./longhorn-images-sbom.tar.gz \
198
- --pre-release \
184
+ common_args=(
185
+ --owner longhorn
186
+ --repo longhorn
187
+ --branch ${{ steps.var.outputs.branch }}
188
+ --tag ${{ steps.var.outputs.tag }}
189
+ --milestone ${{ steps.var.outputs.milestone }}
190
+ --pre-note ./assets/release-preview/pre-note.md
191
+ --note-contributors innobead
192
+ --since-days 365
193
+ --exclude-labels "kind/test"
194
+ --exclude-labels "area/infra"
195
+ --exclude-labels "area/ci"
196
+ --exclude-labels "area/qa"
197
+ --exclude-labels "wontfix"
198
+ --exclude-labels "duplicated"
199
+ --exclude-labels "invalid"
200
+ --exclude-labels "release/task"
201
+ --note-section-labels "highlight"
202
+ --note-section-labels "kind/feature"
203
+ --note-section-labels "kind/improvement"
204
+ --note-section-labels "kind/bug"
205
+ --note-section-labels "area/performance"
206
+ --note-section-labels "area/resilience"
207
+ --note-section-labels "area/stability"
208
+ --note-section-labels "area/scalability"
209
+ --note-section-labels "area/benchmark"
210
+ --pre-hook ./scripts/check-images-ready.sh
211
+ --pre-hook-args "longhornio/longhorn-manager:${{ steps.var.outputs.tag }}"
212
+ --pre-hook-args "longhornio/longhorn-engine:${{ steps.var.outputs.tag }}"
213
+ --pre-hook-args "longhornio/longhorn-instance-manager:${{ steps.var.outputs.tag }}"
214
+ --pre-hook-args "longhornio/longhorn-share-manager:${{ steps.var.outputs.tag }}"
215
+ --pre-hook-args "longhornio/backing-image-manager:${{ steps.var.outputs.tag }}"
216
+ --pre-hook-args "longhornio/longhorn-ui:${{ steps.var.outputs.tag }}"
217
+ --artifacts ./longhorn.yaml
218
+ --artifacts ./longhorn-images.txt
219
+ --artifacts ./charts.tar.gz
220
+ --artifacts ./changelog.md
221
+ --artifacts ./changelog-prev-tag.md
222
+ --artifacts ./longhorn-images-sbom.tar.gz
223
+ --pre-release
199
224
--draft
225
+ )
226
+
227
+ if [ "${{ steps.var.outputs.branch }}" != "v1.6.x" ]; then
228
+ common_args+=(--pre-hook-args "longhornio/longhorn-cli:${{ steps.var.outputs.tag }}")
229
+ fi
230
+
231
+ renote release "${common_args[@]}"
0 commit comments