Skip to content

Commit ab06fa5

Browse files
ci: replace thedoctor0/zip-release with in-repo composite action
Replace the external thedoctor0/zip-release GitHub Action with a local composite action at .github/actions/zip-release that uses built-in runner tools (zip on Linux/macOS, 7z on Windows). Includes a temporary test workflow to verify the zip action produces correct output on all three platforms. Co-Authored-By: rlamb@launchdarkly.com <kingdewman@gmail.com>
1 parent 853c26d commit ab06fa5

File tree

3 files changed

+267
-32
lines changed

3 files changed

+267
-32
lines changed

.github/actions/sdk-release/action.yml

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,16 @@ runs:
7373

7474
- name: Archive Release Linux - GCC/x64/Static
7575
if: runner.os == 'Linux'
76-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
76+
uses: ./.github/actions/zip-release
7777
with:
7878
path: 'build-static/release'
79-
type: 'zip'
8079
filename: 'linux-gcc-x64-static.zip'
8180

8281
- name: Archive Release Linux - GCC/x64/Dynamic
8382
if: runner.os == 'Linux'
84-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
83+
uses: ./.github/actions/zip-release
8584
with:
8685
path: 'build-dynamic/release'
87-
type: 'zip'
8886
filename: 'linux-gcc-x64-dynamic.zip'
8987

9088
- name: Determine CURL artifact suffix for server SDK
@@ -100,18 +98,16 @@ runs:
10098
10199
- name: Archive Release Linux - GCC/x64/Static/CURL
102100
if: runner.os == 'Linux'
103-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
101+
uses: ./.github/actions/zip-release
104102
with:
105103
path: 'build-static-curl/release'
106-
type: 'zip'
107104
filename: 'linux-gcc-x64-static-curl${{ steps.curl-suffix-linux.outputs.suffix }}.zip'
108105

109106
- name: Archive Release Linux - GCC/x64/Dynamic/CURL
110107
if: runner.os == 'Linux'
111-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
108+
uses: ./.github/actions/zip-release
112109
with:
113110
path: 'build-dynamic-curl/release'
114-
type: 'zip'
115111
filename: 'linux-gcc-x64-dynamic-curl${{ steps.curl-suffix-linux.outputs.suffix }}.zip'
116112

117113
- name: Hash Linux Build Artifacts for provenance
@@ -165,34 +161,30 @@ runs:
165161

166162
- name: Archive Release Windows - MSVC/x64/Static
167163
if: runner.os == 'Windows'
168-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
164+
uses: ./.github/actions/zip-release
169165
with:
170166
path: 'build-static/release'
171-
type: 'zip'
172167
filename: 'windows-msvc-x64-static.zip'
173168

174169
- name: Archive Release Windows - MSVC/x64/Dynamic
175170
if: runner.os == 'Windows'
176-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
171+
uses: ./.github/actions/zip-release
177172
with:
178173
path: 'build-dynamic/release'
179-
type: 'zip'
180174
filename: 'windows-msvc-x64-dynamic.zip'
181175

182176
- name: Archive Release Windows - MSVC/x64/Static/Debug
183177
if: runner.os == 'Windows'
184-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
178+
uses: ./.github/actions/zip-release
185179
with:
186180
path: 'build-static-debug/release'
187-
type: 'zip'
188181
filename: 'windows-msvc-x64-static-debug.zip'
189182

190183
- name: Archive Release Windows - MSVC/x64/Dynamic/Debug
191184
if: runner.os == 'Windows'
192-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
185+
uses: ./.github/actions/zip-release
193186
with:
194187
path: 'build-dynamic-debug/release'
195-
type: 'zip'
196188
filename: 'windows-msvc-x64-dynamic-debug.zip'
197189

198190
- name: Determine CURL artifact suffix for server SDK
@@ -208,34 +200,30 @@ runs:
208200
209201
- name: Archive Release Windows - MSVC/x64/Static/CURL
210202
if: runner.os == 'Windows'
211-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
203+
uses: ./.github/actions/zip-release
212204
with:
213205
path: 'build-static-curl/release'
214-
type: 'zip'
215206
filename: 'windows-msvc-x64-static-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip'
216207

217208
- name: Archive Release Windows - MSVC/x64/Dynamic/CURL
218209
if: runner.os == 'Windows'
219-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
210+
uses: ./.github/actions/zip-release
220211
with:
221212
path: 'build-dynamic-curl/release'
222-
type: 'zip'
223213
filename: 'windows-msvc-x64-dynamic-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip'
224214

225215
- name: Archive Release Windows - MSVC/x64/Static/Debug/CURL
226216
if: runner.os == 'Windows'
227-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
217+
uses: ./.github/actions/zip-release
228218
with:
229219
path: 'build-static-debug-curl/release'
230-
type: 'zip'
231220
filename: 'windows-msvc-x64-static-debug-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip'
232221

233222
- name: Archive Release Windows - MSVC/x64/Dynamic/Debug/CURL
234223
if: runner.os == 'Windows'
235-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
224+
uses: ./.github/actions/zip-release
236225
with:
237226
path: 'build-dynamic-debug-curl/release'
238-
type: 'zip'
239227
filename: 'windows-msvc-x64-dynamic-debug-curl${{ steps.curl-suffix-windows.outputs.suffix }}.zip'
240228

241229
- name: Hash Windows Build Artifacts for provenance
@@ -278,18 +266,16 @@ runs:
278266

279267
- name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Static
280268
if: runner.os == 'macOS'
281-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
269+
uses: ./.github/actions/zip-release
282270
with:
283271
path: 'build-static/release'
284-
type: 'zip'
285272
filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-static.zip'
286273

287274
- name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Dynamic
288275
if: runner.os == 'macOS'
289-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
276+
uses: ./.github/actions/zip-release
290277
with:
291278
path: 'build-dynamic/release'
292-
type: 'zip'
293279
filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-dynamic.zip'
294280

295281
- name: Determine CURL artifact suffix for server SDK
@@ -305,18 +291,16 @@ runs:
305291
306292
- name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Static/CURL
307293
if: runner.os == 'macOS'
308-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
294+
uses: ./.github/actions/zip-release
309295
with:
310296
path: 'build-static-curl/release'
311-
type: 'zip'
312297
filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-static-curl${{ steps.curl-suffix-macos.outputs.suffix }}.zip'
313298

314299
- name: Archive Release Mac - AppleClang/${{ inputs.mac_artifact_arch }}/Dynamic/CURL
315300
if: runner.os == 'macOS'
316-
uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # 0.7.1
301+
uses: ./.github/actions/zip-release
317302
with:
318303
path: 'build-dynamic-curl/release'
319-
type: 'zip'
320304
filename: 'mac-clang-${{ inputs.mac_artifact_arch }}-dynamic-curl${{ steps.curl-suffix-macos.outputs.suffix }}.zip'
321305

322306
- name: Hash Mac Build Artifacts for provenance
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Zip Release'
2+
description: 'Creates a zip archive from a specified path. Works on Linux, macOS, and Windows using built-in runner tools.'
3+
inputs:
4+
path:
5+
description: 'The path to archive (relative to working directory).'
6+
required: true
7+
filename:
8+
description: 'The output zip filename.'
9+
required: true
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Create zip (Linux/macOS)
14+
if: runner.os != 'Windows'
15+
shell: bash
16+
run: zip -r "${{ inputs.filename }}" ${{ inputs.path }}
17+
18+
- name: Create zip (Windows)
19+
if: runner.os == 'Windows'
20+
shell: bash
21+
run: 7z a -tzip "${{ inputs.filename }}" ${{ inputs.path }}

0 commit comments

Comments
 (0)