@@ -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+
2954blocks :
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
0 commit comments