Skip to content

Commit 722ee53

Browse files
authored
ci: Enable dynamodb-source releases via release-please (#568)
## Summary Wires `libs/server-sdk-dynamodb-source` into the release-please draft + publish flow so its releases cut and un-draft automatically, same as client/server/redis. - `"draft": true` in `release-please-config.json` for dynamodb. - `release-server-dynamodb` (matrix) + `-mac-arm64` + `publish-release-server-dynamodb` jobs in `release-please.yml`. Mirrors the redis pattern. - `sdk-release` action passes `CURL_ROOT` and `CMAKE_PREFIX_PATH` to its Linux and macOS Boost.Beast build steps. aws-sdk-cpp calls `find_package(CURL)` on Linux/macOS regardless of `LD_CURL_NETWORKING`; on macOS the hint is needed because homebrew's curl isn't in cmake's default search path. Windows uses WinHTTP, so aws-sdk-cpp doesn't need libcurl there and the env isn't passed. The dynamodb release path has never been cut end-to-end. Per-package CI builds dynamodb daily, but the `sdk-release` composite action hasn't been run against it -- the first real release may surface latent issues.
1 parent b437677 commit 722ee53

3 files changed

Lines changed: 104 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ runs:
5959
WORKSPACE: ${{ inputs.sdk_path }}
6060
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
6161
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
62+
# aws-sdk-cpp (dynamodb-source) calls find_package(CURL) on Linux/macOS, regardless of LD_CURL_NETWORKING.
63+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
64+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}
6265

6366
- name: Build Linux Artifacts (CURL)
6467
if: runner.os == 'Linux'
@@ -253,6 +256,9 @@ runs:
253256
WORKSPACE: ${{ inputs.sdk_path }}
254257
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
255258
OPENSSL_ROOT_DIR: ${{ steps.install-openssl.outputs.OPENSSL_ROOT_DIR }}
259+
# aws-sdk-cpp (dynamodb-source) calls find_package(CURL) on Linux/macOS, regardless of LD_CURL_NETWORKING.
260+
CURL_ROOT: ${{ steps.install-curl.outputs.CURL_ROOT }}
261+
CMAKE_PREFIX_PATH: ${{ steps.install-curl.outputs.CURL_ROOT }}
256262

257263
- name: Build Mac Artifacts (CURL)
258264
if: runner.os == 'macOS'

.github/workflows/release-please.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
package-server-tag: ${{ steps.release.outputs['libs/server-sdk--tag_name'] }}
1818
package-server-redis-released: ${{ steps.release.outputs['libs/server-sdk-redis-source--release_created'] }}
1919
package-server-redis-tag: ${{ steps.release.outputs['libs/server-sdk-redis-source--tag_name'] }}
20+
package-server-dynamodb-released: ${{ steps.release.outputs['libs/server-sdk-dynamodb-source--release_created'] }}
21+
package-server-dynamodb-tag: ${{ steps.release.outputs['libs/server-sdk-dynamodb-source--tag_name'] }}
2022
package-server-otel-released: ${{ steps.release.outputs['libs/server-sdk-otel--release_created'] }}
2123
package-server-otel-tag: ${{ steps.release.outputs['libs/server-sdk-otel--tag_name'] }}
2224
steps:
@@ -266,6 +268,85 @@ jobs:
266268
with:
267269
subject-checksums: checksums.txt
268270

271+
release-server-dynamodb:
272+
strategy:
273+
matrix:
274+
# Each of the platforms for which release-artifacts need generated.
275+
os: [ ubuntu-22.04, windows-2022, macos-15-large ]
276+
runs-on: ${{ matrix.os }}
277+
needs: [ 'release-please' ]
278+
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true'}}
279+
permissions:
280+
contents: write
281+
attestations: write
282+
id-token: write
283+
steps:
284+
# https://github.com/actions/checkout/releases/tag/v4.3.0
285+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
286+
- id: release-server-dynamodb
287+
name: Full release of libs/server-sdk-dynamodb-source
288+
uses: ./.github/actions/sdk-release
289+
with:
290+
# The tag of the release to upload artifacts to.
291+
tag_name: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
292+
github_token: ${{secrets.GITHUB_TOKEN}}
293+
sdk_path: 'libs/server-sdk-dynamodb-source'
294+
sdk_cmake_target: 'launchdarkly-cpp-server-dynamodb-source'
295+
- name: Generate checksums file
296+
env:
297+
HASHES_LINUX: ${{ steps.release-server-dynamodb.outputs.hashes-linux }}
298+
HASHES_WINDOWS: ${{ steps.release-server-dynamodb.outputs.hashes-windows }}
299+
HASHES_MACOS: ${{ steps.release-server-dynamodb.outputs.hashes-macos }}
300+
run: |
301+
# BSD base64 (macOS) uses -D to decode; GNU base64 (Linux/Windows) uses -d.
302+
if [[ "$OSTYPE" == darwin* ]]; then B64_DECODE="base64 -D"; else B64_DECODE="base64 -d"; fi
303+
if [ -n "${HASHES_LINUX}" ]; then
304+
echo "${HASHES_LINUX}" | $B64_DECODE > checksums.txt
305+
elif [ -n "${HASHES_WINDOWS}" ]; then
306+
echo "${HASHES_WINDOWS}" | $B64_DECODE > checksums.txt
307+
elif [ -n "${HASHES_MACOS}" ]; then
308+
echo "${HASHES_MACOS}" | $B64_DECODE > checksums.txt
309+
fi
310+
shell: bash
311+
# https://github.com/actions/attest/releases/tag/v4.1.0
312+
- name: Attest build provenance
313+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
314+
with:
315+
subject-checksums: checksums.txt
316+
317+
release-server-dynamodb-mac-arm64:
318+
runs-on: macos-15
319+
needs: [ 'release-please' ]
320+
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true'}}
321+
permissions:
322+
contents: write
323+
attestations: write
324+
id-token: write
325+
steps:
326+
# https://github.com/actions/checkout/releases/tag/v4.3.0
327+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955
328+
- id: release-server-dynamodb
329+
name: Full release of libs/server-sdk-dynamodb-source (macOS arm64)
330+
uses: ./.github/actions/sdk-release
331+
with:
332+
tag_name: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
333+
github_token: ${{secrets.GITHUB_TOKEN}}
334+
sdk_path: 'libs/server-sdk-dynamodb-source'
335+
sdk_cmake_target: 'launchdarkly-cpp-server-dynamodb-source'
336+
mac_artifact_arch: 'arm64'
337+
- name: Generate checksums file
338+
env:
339+
HASHES: ${{ steps.release-server-dynamodb.outputs.hashes-macos }}
340+
run: |
341+
# This job always runs on macOS, so use -D (BSD base64 decode).
342+
echo "${HASHES}" | base64 -D > checksums.txt
343+
shell: bash
344+
# https://github.com/actions/attest/releases/tag/v4.1.0
345+
- name: Attest build provenance
346+
uses: actions/attest@59d89421af93a897026c735860bf21b6eb4f7b26 # v4.1.0
347+
with:
348+
subject-checksums: checksums.txt
349+
269350
publish-release-client:
270351
needs: ['release-please', 'release-client', 'release-client-mac-arm64']
271352
if: ${{ needs.release-please.outputs.package-client-released == 'true' }}
@@ -314,6 +395,22 @@ jobs:
314395
--repo ${{ github.repository }}
315396
--draft=false
316397
398+
publish-release-server-dynamodb:
399+
needs: ['release-please', 'release-server-dynamodb', 'release-server-dynamodb-mac-arm64']
400+
if: ${{ needs.release-please.outputs.package-server-dynamodb-released == 'true' }}
401+
runs-on: ubuntu-latest
402+
permissions:
403+
contents: write
404+
steps:
405+
- name: Publish release
406+
env:
407+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
408+
TAG_NAME: ${{ needs.release-please.outputs.package-server-dynamodb-tag }}
409+
run: >
410+
gh release edit "$TAG_NAME"
411+
--repo ${{ github.repository }}
412+
--draft=false
413+
317414
publish-release-server-otel:
318415
needs: ['release-please']
319416
if: ${{ needs.release-please.outputs.package-server-otel-released == 'true' }}

release-please-config.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"extra-files": [
4040
"CMakeLists.txt"
4141
],
42+
"draft": true,
4243
"force-tag-creation": true
4344
},
4445
"libs/server-sdk-otel": {

0 commit comments

Comments
 (0)