Skip to content

Commit f3fcce1

Browse files
committed
Try adding packaging flow
1 parent bb9449d commit f3fcce1

File tree

2 files changed

+56
-30
lines changed

2 files changed

+56
-30
lines changed

.semaphore/semaphore.yml

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,75 @@ global_job_config:
2626
commands:
2727
- checkout
2828

29+
# blocks:
30+
# - name: "Linux amd64: Build and test"
31+
# dependencies: [ ]
32+
# task:
33+
# agent:
34+
# machine:
35+
# type: s1-prod-ubuntu20-04-amd64-2
36+
# prologue:
37+
# commands:
38+
# - sem-version node 18.19.0
39+
# - node --version
40+
# - npm --version
41+
# - npx --version
42+
# - sudo apt-get update -q
43+
# - git submodule update --init --recursive
44+
# - sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
45+
# - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
46+
# jobs:
47+
# - name: "Test"
48+
# commands:
49+
# - make test
50+
# - name: "ESLint"
51+
# commands:
52+
# - npx eslint lib/kafkajs
53+
2954
blocks:
30-
# - name: "Linux amd64"
31-
# dependencies: [ ]
55+
- name: "Linux amd64: Release"
56+
dependencies: [ ]
57+
run:
58+
when: "tag =~ '^v[0-9]\\.'"
59+
task:
60+
agent:
61+
machine:
62+
type: s1-prod-ubuntu20-04-amd64-2
63+
prologue:
64+
commands:
65+
- sem-version node 18.19.0
66+
- node --version
67+
- npm --version
68+
- npx --version
69+
- sudo apt-get update -q
70+
- git submodule update --init --recursive
71+
- sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
72+
jobs:
73+
- name: "Release"
74+
commands:
75+
- export ARTIFACT_KEY="node-librdkafka-${SEMAPHORE_GIT_TAG_NAME}-node-v108-linux-x64.tar.gz"
76+
- npm install # node-pre-gyp will fallback to build here, because new tag implies no release yet.
77+
- npx node-pre-gyp package
78+
- ls build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}
79+
- artifact push project "build/stage/${SEMAPHORE_GIT_TAG_NAME}/${ARTIFACT_KEY}" --destination "releases/${ARTIFACT_KEY}"
80+
81+
# - name: 'OSX arm64/m1'
82+
# dependencies: []
3283
# task:
3384
# agent:
3485
# machine:
35-
# type: s1-prod-ubuntu20-04-amd64-2
86+
# type: s1-prod-macos-arm64
3687
# prologue:
3788
# commands:
3889
# - sem-version node 18.19.0
3990
# - node --version
4091
# - npm --version
4192
# - npx --version
42-
# - sudo apt-get update -q
4393
# - git submodule update --init --recursive
4494
# jobs:
45-
# - name: "Build from source and test"
95+
# - name: 'Build from source and test'
4696
# commands:
47-
# - sudo apt install -y libcurl4-openssl-dev libcrypto++-dev libssl-dev libzstd-dev
4897
# - npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
4998
# - make test
50-
# - name: "ESLint"
51-
# commands:
52-
# - npm install --only=dev
53-
# - npx eslint lib/kafkajs
54-
55-
- name: 'OSX arm64/m1'
56-
dependencies: []
57-
task:
58-
agent:
59-
machine:
60-
type: s1-prod-macos-arm64
61-
prologue:
62-
commands:
63-
- sem-version node 18.19.0
64-
- node --version
65-
- npm --version
66-
- npx --version
67-
- git submodule update --init --recursive
68-
jobs:
69-
- name: 'Build from source and test'
70-
commands:
71-
- npm install # this will actually not build anything if we have a release, but rather, fetch things using node-pre-gyp - so change this later.
72-
- make test
7399

74100

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "confluent-kafka-js",
3-
"version": "v2.18.0",
3+
"version": "v0.1.0-devel",
44
"description": "Node.js bindings for librdkafka",
55
"librdkafka": "2.3.0",
66
"main": "lib/index.js",

0 commit comments

Comments
 (0)