Skip to content

Commit c56f068

Browse files
committed
Make packaging flow easier
1 parent 9fb2203 commit c56f068

File tree

1 file changed

+35
-15
lines changed

1 file changed

+35
-15
lines changed

.semaphore/semaphore.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ blocks:
120120
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
121121
- npx node-pre-gyp package
122122
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
123-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
123+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
124124
- name: "Release: LTS:20"
125125
commands:
126126
- sem-version node 20.10.0
@@ -129,7 +129,7 @@ blocks:
129129
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
130130
- npx node-pre-gyp package
131131
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
132-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
132+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
133133
- name: "Release: latest: 21"
134134
commands:
135135
- sem-version node 21.4.0
@@ -138,7 +138,7 @@ blocks:
138138
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
139139
- npx node-pre-gyp package
140140
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
141-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
141+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
142142

143143
- name: "Linux arm64: Release"
144144
dependencies: [ ]
@@ -164,7 +164,7 @@ blocks:
164164
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
165165
- npx node-pre-gyp package
166166
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
167-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
167+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
168168
- name: "Release: LTS:20"
169169
commands:
170170
- sem-version node 20.10.0
@@ -173,7 +173,7 @@ blocks:
173173
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
174174
- npx node-pre-gyp package
175175
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
176-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
176+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
177177
- name: "Release: latest: 21"
178178
commands:
179179
- sem-version node 21.4.0
@@ -182,7 +182,7 @@ blocks:
182182
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
183183
- npx node-pre-gyp package
184184
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
185-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
185+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
186186

187187
- name: "Linux amd64 musl: Release"
188188
dependencies: [ ]
@@ -206,21 +206,21 @@ blocks:
206206
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
207207
- docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
208208
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
209-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
209+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
210210
- name: "Release: LTS:20"
211211
commands:
212212
- export NODE_ABI=115
213213
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
214214
- docker run -v "$(pwd):/v" node:20-alpine /v/.semaphore/build-docker.sh
215215
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
216-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
216+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
217217
- name: "Release: latest: 21"
218218
commands:
219219
- export NODE_ABI=120
220220
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
221221
- docker run -v "$(pwd):/v" node:21-alpine /v/.semaphore/build-docker.sh
222222
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
223-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
223+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
224224

225225
- name: "Linux arm64 musl: Release"
226226
dependencies: [ ]
@@ -244,21 +244,21 @@ blocks:
244244
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
245245
- docker run -v "$(pwd):/v" node:18-alpine /v/.semaphore/build-docker.sh
246246
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
247-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
247+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
248248
- name: "Release: LTS:20"
249249
commands:
250250
- export NODE_ABI=115
251251
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
252252
- docker run -v "$(pwd):/v" node:20-alpine /v/.semaphore/build-docker.sh
253253
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
254-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
254+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
255255
- name: "Release: latest: 21"
256256
commands:
257257
- export NODE_ABI=120
258258
- export ARTIFACT_KEY="confluent-kafka-js-${SEMAPHORE_GIT_TAG_NAME}-node-v${NODE_ABI}-linux-${LIBC}-${ARCHITECTURE}.tar.gz"
259259
- docker run -v "$(pwd):/v" node:21-alpine /v/.semaphore/build-docker.sh
260260
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
261-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
261+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
262262

263263
- name: "macOS arm64/m1: Release"
264264
dependencies: [ ]
@@ -284,7 +284,7 @@ blocks:
284284
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
285285
- npx node-pre-gyp package
286286
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
287-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
287+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
288288
- name: "Release: LTS:20"
289289
commands:
290290
- sem-version node 20.10.0
@@ -293,7 +293,7 @@ blocks:
293293
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
294294
- npx node-pre-gyp package
295295
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
296-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
296+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
297297
- name: "Release: latest: 21"
298298
commands:
299299
- sem-version node 21.4.0
@@ -302,4 +302,24 @@ blocks:
302302
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
303303
- npx node-pre-gyp package
304304
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
305-
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
305+
- artifact push workflow "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}"
306+
307+
- name: 'Packaging: tar all release artifacts'
308+
dependencies:
309+
- 'Linux amd64: Release'
310+
- 'Linux arm64: Release'
311+
- 'Linux amd64 musl: Release'
312+
- 'Linux arm64 musl: Release'
313+
- 'macOS arm64/m1: Release'
314+
run:
315+
when: "tag =~ '^v[0-9]\\.'"
316+
task:
317+
agent:
318+
machine:
319+
type: s1-prod-ubuntu20-04-amd64-2
320+
jobs:
321+
- name: "Tarball"
322+
commands:
323+
- artifact pull workflow artifacts
324+
- tar -czvf artifacts.${SEMAPHORE_GIT_TAG_NAME}.tar.gz artifacts
325+
- artifact push project "artifacts.${SEMAPHORE_GIT_TAG_NAME}.tar.gz" --destination "releases/${SEMAPHORE_GIT_TAG_NAME}/artifacts.${SEMAPHORE_GIT_TAG_NAME}.tar.gz"

0 commit comments

Comments
 (0)