Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
ci: reference full-release action, not workflow (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld authored Apr 23, 2024
1 parent 1045f28 commit da30008
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/actions/build-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ runs:

- name: Build
shell: bash
run: dotnet build /p:Configuration=Release ${{ inputs.project_file }}
run: dotnet build -p:Configuration=Release ${{ inputs.project_file }}
17 changes: 12 additions & 5 deletions .github/actions/full-release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ inputs:
required: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
type: boolean
required: true
aws_role:
description: 'The AWS role to assume, needed to fetch release secrets.'
required: true
token:
description: 'The GitHub token to use for publishing documentation.'
required: true

runs:
Expand All @@ -33,7 +38,7 @@ runs:
- uses: launchdarkly/gh-actions/actions/[email protected]
name: Get secrets
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
aws_assume_role: ${{ inputs.aws_role }}
ssm_parameter_pairs: '/production/common/releasing/digicert/host = DIGICERT_HOST,
/production/common/releasing/digicert/api_key = DIGICERT_API_KEY,
/production/common/releasing/digicert/client_cert_file_b64 = DIGICERT_CLIENT_CERT_FILE_B64,
Expand All @@ -44,17 +49,18 @@ runs:
- name: Release build
uses: ./.github/actions/build-release
with:
project_file: pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj
project_file: ${{ inputs.project_file }}

- name: Sign DLLs
uses: launchdarkly/gh-actions/actions/[email protected]
with:
build_output_path: ${{ inputs.build_output_path }}
build_configuration_path: ${{ inputs.build_output_path }}
dll_name: ${{ inputs.dll_name }}

- name: Publish Nupkg
uses: ./.github/actions/publish-package
with:
project_file: ${{ inputs.project_file }}
dry_run: ${{ inputs.dry_run }}

- name: Build Documentation
Expand All @@ -63,7 +69,8 @@ runs:
workspace_path: ${{ inputs.workspace_path }}

- name: Publish Documentation
if: ${{ inputs.dry_run == 'false' }}
uses: ./.github/actions/publish-docs
with:
workspace_path: ${{ inputs.workspace_path }}
token: ${{secrets.GITHUB_TOKEN}}
token: ${{ inputs.token }}
13 changes: 9 additions & 4 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,27 @@ jobs:
id-token: write
contents: write
steps:
- uses: ./.github/workflows/full-release.yml
- uses: actions/checkout@v4
- uses: ./.github/actions/full-release
if: ${{ inputs.pkg_name == 'LaunchDarkly.ServerSdk' }}
with:
workspace_path: 'pkgs/sdk/server'
project_file: 'pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj'
test_project_file: 'pkgs/sdk/server/test/LaunchDarkly.ServerSdk.Tests.csproj'
build_output_path: 'pkgs/sdk/server/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.dll'
dry_run: false
dry_run: ${{ inputs.dry_run }}
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/workflows/full-release.yml
- uses: ./.github/actions/full-release
if: ${{ inputs.pkg_name == 'LaunchDarkly.ServerSdk.Telemetry' }}
with:
workspace_path: 'pkgs/telemetry'
project_file: 'pkgs/telemetry/src/LaunchDarkly.ServerSdk.Telemetry.csproj'
test_project_file: 'pkgs/telemetry/test/LaunchDarkly.ServerSdk.Telemetry.Tests.csproj'
build_output_path: 'pkgs/telemetry/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.Telemetry.dll'
dry_run: false
dry_run: ${{ inputs.dry_run }}
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
build_output_path: 'pkgs/sdk/server/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.dll'
dry_run: false
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}

release-telemetry:
runs-on: ubuntu-latest
Expand All @@ -58,3 +60,5 @@ jobs:
build_output_path: 'pkgs/telemetry/src/bin/Release/'
dll_name: 'LaunchDarkly.ServerSdk.Telemetry.dll'
dry_run: false
aws_role: ${{ vars.AWS_ROLE_ARN }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion pkgs/sdk/server/src/LaunchDarkly.ServerSdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


<PropertyGroup Condition="'$(Configuration)'=='Release'">
<AssemblyOriginatorKeyFile>../../LaunchDarkly.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>../../../../LaunchDarkly.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion pkgs/telemetry/src/LaunchDarkly.ServerSdk.Telemetry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<AssemblyOriginatorKeyFile>../../LaunchDarkly.snk</AssemblyOriginatorKeyFile>
<AssemblyOriginatorKeyFile>../../../LaunchDarkly.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>

Expand Down

0 comments on commit da30008

Please sign in to comment.