Skip to content

chore: refactor manual release workflow to allow for SDK selection #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/manual-client-release-artifacts.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/manual-sdk-release-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Checks out the tag, builds release builds, and attaches them to the release for the tag.
# If you need to change build scripts, then update the tag to include the modifications.
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to create release artifacts for.'
required: true
sdk_target:
description: 'The library/cmake target to release (delimited by ":").'
required: true
default: 'libs/client-sdk:launchdarkly-cpp-client'
type: choice
options:
- libs/client-sdk:launchdarkly-cpp-client

name: Publish SDK Artifacts

jobs:
split-input:
runs-on: ubuntu-latest
steps:
- name: Determine CMake target and SDK library path
run: |
INPUT="${{ inputs.sdk_target }}"
IFS=':' read -ra PATH_AND_TARGET <<< "$INPUT"
echo "SDK_PATH=${PATH_AND_TARGET[0]}" >> $GITHUB_OUTPUT
echo "SDK_CMAKE_TARGET=${PATH_AND_TARGET[1]}" >> $GITHUB_OUTPUT
release-sdk:
needs: split-input
strategy:
matrix:
# Each of the platforms for which release-artifacts need generated.
os: [ ubuntu-latest, windows-2022, macos-12 ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.tag }}
- id: release-sdk
name: Full release of ${{ needs.split-input.outputs.SDK_PATH }}
uses: ./.github/actions/sdk-release
with:
# The tag of the release to upload artifacts to.
tag_name: ${{ inputs.tag }}
github_token: ${{secrets.GITHUB_TOKEN}}
sdk_path: ${{ needs.split-input.outputs.SDK_PATH }}
sdk_cmake_target: ${{ needs.split-input.outputs.SDK_CMAKE_TARGET }}