Skip to content

Commit 86851da

Browse files
authored
chore: refactor client-release action to support server-side SDK (#207)
The intention is to be able to reuse `actions/client-release` for the server-side SDK. This commit adds new inputs for specifying those parameters.
1 parent 64e3f1a commit 86851da

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

.github/actions/client-release/action.yml renamed to .github/actions/sdk-release/action.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
# This is a composite workflow that an generate all the release artifacts
2-
# for the C++ client SDK.
2+
# for the C++ client-side & server-side SDKs.
33

44
# This can be ran automatically with the tag_name output from release-please,
55
# or ran triggered manually with a user provided tag.
66

7-
name: C++ Client Release
8-
description: C++ Client Release Process
7+
name: C++ SDK Release
8+
description: C++ SDK Release Process
99
inputs:
1010
tag_name:
1111
description: 'The tag name of the release to upload artifacts to.'
1212
required: true
1313
github_token:
14+
description: 'The GitHub token to use for uploading artifacts.'
1415
required: true
16+
sdk_path:
17+
description: 'Path to the sdk, e.g. libs/client-sdk.'
18+
required: true
19+
sdk_cmake_target:
20+
description: 'CMake target of the sdk, e.g. launchdarkly-cpp-client.'
1521

1622
runs:
1723
using: composite
@@ -28,10 +34,10 @@ runs:
2834
run: |
2935
sudo apt-get install doxygen
3036
sudo apt-get install graphviz
31-
./scripts/build-release.sh launchdarkly-cpp-client
32-
./scripts/build-docs.sh libs/client-sdk
37+
./scripts/build-release.sh ${{ inputs.sdk_cmake_target }}
38+
./scripts/build-docs.sh ${{ inputs.sdk_path }}
3339
env:
34-
WORKSPACE: libs/client-sdk
40+
WORKSPACE: ${{ inputs.sdk_path }}
3541
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
3642

3743
- name: Archive Release Linux - GCC/x64/Static
@@ -64,7 +70,7 @@ runs:
6470
if: runner.os == 'Linux'
6571
uses: ./.github/actions/publish-docs
6672
with:
67-
workspace_path: libs/client-sdk
73+
workspace_path: ${{ inputs.sdk_path }}
6874

6975
- name: Configure MSVC
7076
if: runner.os == 'Windows'
@@ -78,7 +84,7 @@ runs:
7884
BOOST_LIBRARY_DIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
7985
BOOST_LIBRARYDIR: 'C:\local\boost_1_81_0\lib64-msvc-14.3'
8086
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
81-
run: ./scripts/build-windows.sh launchdarkly-cpp-client
87+
run: ./scripts/build-windows.sh ${{ inputs.sdk_cmake_target }}
8288

8389
- name: Archive Release Windows - MSVC/x64/Static
8490
if: runner.os == 'Windows'
@@ -130,9 +136,9 @@ runs:
130136
echo "OPENSSL_ROOT_DIR=$(brew --prefix [email protected])" >> "$GITHUB_ENV"
131137
export OPENSSL_ROOT_DIR=$(brew --prefix [email protected])
132138
133-
./scripts/build-release.sh launchdarkly-cpp-client
139+
./scripts/build-release.sh ${{ inputs.sdk_cmake_target }}
134140
env:
135-
WORKSPACE: libs/client-sdk
141+
WORKSPACE: ${{ inputs.sdk_path }}
136142
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
137143

138144
- name: Archive Release Mac - AppleClang/x64/Static

.github/workflows/manual-client-release-artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ jobs:
2222
ref: ${{ inputs.tag }}
2323
- id: release-client
2424
name: Full release of libs/client-sdk
25-
uses: ./.github/actions/client-release
25+
uses: ./.github/actions/sdk-release
2626
with:
2727
# The tag of the release to upload artifacts to.
2828
tag_name: ${{ inputs.tag }}
2929
github_token: ${{secrets.GITHUB_TOKEN}}
30+
sdk_path: 'libs/client-sdk'
31+
sdk_cmake_target: 'launchdarkly-cpp-client'

.github/workflows/release-please.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ jobs:
3030
- uses: actions/checkout@v3
3131
- id: release-client
3232
name: Full release of libs/client-sdk
33-
uses: ./.github/actions/client-release
33+
uses: ./.github/actions/sdk-release
3434
with:
3535
# The tag of the release to upload artifacts to.
3636
tag_name: ${{ needs.release-please.outputs.package-client-tag }}
3737
github_token: ${{secrets.GITHUB_TOKEN}}
38+
sdk_path: 'libs/client-sdk'
39+
sdk_cmake_target: 'launchdarkly-cpp-client'

0 commit comments

Comments
 (0)