1
+ # Run manually to prepare a draft release for the next version of the extension.
2
+ # The workflow will create a draft github release where the .vsix can be
3
+ # downloaded and manually tested before publishing. To release the version,
4
+ # publish the draft release, which will trigger the publish-release workflow.
1
5
name : Draft release
2
6
3
7
on :
4
8
workflow_dispatch :
5
9
inputs :
6
10
versionBump :
7
- description : ' Version bump'
11
+ description : " Version bump"
8
12
type : choice
9
13
required : true
10
- default : ' patch'
14
+ default : " patch"
11
15
options :
12
- - patch
13
- - minor
14
- - major
15
- - exact-version
16
+ - patch
17
+ - minor
18
+ - major
19
+ - exact-version
16
20
17
21
exactVersion :
18
22
description : ' Exact version: (Only effective selecting "exact-version" as version bump)'
19
23
required : false
20
24
21
- description : |
22
- Run manually to prepare a draft release for the next version of the extension. The workflow will create a draft
23
- github release where the .vsix can be downloaded and manually tested before publishing. To release the version,
24
- publish the draft release, which will trigger the publish-release workflow.
25
-
26
25
permissions :
27
26
contents : write
28
27
29
28
jobs :
30
29
prepare-release :
31
30
runs-on : ubuntu-latest
31
+ outputs :
32
+ release-tag : ${{ steps.set-tag.outputs.release-tag }}
32
33
steps :
33
34
- name : Checkout
34
35
uses : actions/checkout@v4
85
86
exit 1
86
87
fi
87
88
88
- - name : Run tests and build
89
- uses : ./.github/workflows/actions/test-and-build
89
+ - name : Set release tag output
90
+ id : set-tag
91
+ run : echo "release-tag=${RELEASE_TAG}" >> $GITHUB_OUTPUT
92
+
93
+ - name : Upload updated package.json
94
+ uses : actions/upload-artifact@v4
95
+ with :
96
+ name : updated-package-json
97
+ path : package.json
98
+
99
+ build-and-package :
100
+ name : Check, Build and Package
101
+ runs-on : ubuntu-latest
102
+ needs : prepare-release
103
+
104
+ steps :
105
+ - name : Checkout
106
+ uses : actions/checkout@v4
107
+ with :
108
+ fetch-depth : 0
109
+
110
+ - name : Download updated package.json
111
+ uses : actions/download-artifact@v4
112
+ with :
113
+ name : updated-package-json
114
+
115
+ - name : Setup Node.js Environment
116
+ uses : actions/setup-node@v4
117
+ with :
118
+ node-version : 22.15.1
119
+ cache : npm
120
+
121
+ - name : Check, build and package
122
+ uses : ./.github/workflows/actions/build-and-package
90
123
with :
91
124
SEGMENT_KEY : ${{ secrets.SEGMENT_KEY_PROD }}
92
125
ARTIFACTORY_HOST : ${{ secrets.ARTIFACTORY_HOST }}
@@ -97,9 +130,57 @@ jobs:
97
130
SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
98
131
JIRA_API_TOKEN : ${{ secrets.JIRA_API_TOKEN }}
99
132
133
+ test :
134
+ name : Test
135
+ needs : build-and-package
136
+
137
+ strategy :
138
+ matrix :
139
+ os : [ubuntu-latest, windows-latest, macos-latest]
140
+ fail-fast : false
141
+
142
+ runs-on : ${{ matrix.os }}
143
+
144
+ steps :
145
+ - name : Checkout
146
+ uses : actions/checkout@v4
147
+ with :
148
+ fetch-depth : 0
149
+
150
+ - name : Download updated package.json
151
+ uses : actions/download-artifact@v4
152
+ with :
153
+ name : updated-package-json
154
+
155
+ - name : Setup Node.js Environment
156
+ uses : actions/setup-node@v4
157
+ with :
158
+ node-version : 22.15.1
159
+ cache : npm
160
+
161
+ - name : Run tests
162
+ uses : ./.github/workflows/actions/run-tests
163
+ with :
164
+ SEGMENT_KEY : ${{ secrets.SEGMENT_KEY_PROD }}
165
+
166
+ create-draft-release :
167
+ name : Create Draft Release
168
+ runs-on : ubuntu-latest
169
+ needs : [prepare-release, test]
170
+
171
+ steps :
172
+ - name : Checkout
173
+ uses : actions/checkout@v4
174
+
175
+ - name : Download VSIX artifact
176
+ uses : actions/download-artifact@v4
177
+ with :
178
+ name : VSIX Package
179
+
100
180
- name : Create Draft Release
101
181
run : |
102
182
set -e
183
+ RELEASE_TAG="${{ needs.prepare-release.outputs.release-tag }}"
103
184
echo Creating draft release for: "${RELEASE_TAG}"
104
185
ls *.vsix
105
186
ls *.vsix.sig
@@ -114,4 +195,3 @@ jobs:
114
195
shell : bash
115
196
env :
116
197
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
117
-
0 commit comments