-
Notifications
You must be signed in to change notification settings - Fork 0
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
ci: updating release actions to use ubuntu-latest by default #14
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
# This workflow exists because the client sdk build process requires macos. | ||
name: Publish SDK Client Package | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run. If so no package will be published.' | ||
type: boolean | ||
required: true | ||
workflow_call: | ||
inputs: | ||
dry_run: | ||
description: 'Is this a dry run. If so no package will be published.' | ||
type: boolean | ||
required: true | ||
outputs: | ||
hashes: | ||
description: sha256sum hashes of built artifacts | ||
value: ${{ jobs.publish.outputs.hashes }} | ||
|
||
jobs: | ||
# Building is done on mac runner due to xcode build dependencies | ||
build: | ||
runs-on: macos-latest | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # fetch all history, useful for docs | ||
|
||
- name: Setup Env from project's Env file | ||
shell: bash | ||
run: echo "$(cat pkgs/sdk/client/github_actions.env)" >> $GITHUB_ENV | ||
|
||
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 | ||
name: Get secrets | ||
with: | ||
aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
s3_path_pairs: 'launchdarkly-releaser/dotnet/LaunchDarkly.snk = LaunchDarkly.snk' | ||
|
||
- name: CI check | ||
uses: ./.github/actions/ci | ||
with: | ||
project_file: ${{ env.PROJECT_FILE }} | ||
test_project_file: ${{ env.TEST_PROJECT_FILE }} | ||
|
||
- name: Release build | ||
uses: ./.github/actions/build-release | ||
with: | ||
project_file: ${{ env.PROJECT_FILE }} | ||
|
||
- name: Build Documentation | ||
uses: ./.github/actions/build-docs | ||
with: | ||
workspace_path: ${{ env.WORKSPACE_PATH }} | ||
|
||
- name: Retain build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dir-bin-release | ||
path: ${{ env.BUILD_OUTPUT_PATH }} | ||
retention-days: 1 | ||
|
||
- name: Retain docs artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dir-docs | ||
path: ${{ env.WORKSPACE_PATH }}/docs | ||
retention-days: 1 | ||
|
||
# Signing DLLs is done on Ubuntu due to Digicert tooling compatibility | ||
sign-dlls: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
permissions: | ||
id-token: write | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Env from project's Env file | ||
shell: bash | ||
run: echo "$(cat pkgs/sdk/client/github_actions.env)" >> $GITHUB_ENV | ||
|
||
- name: Restore release artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dir-bin-release | ||
path: ${{ env.BUILD_OUTPUT_PATH }} | ||
|
||
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 | ||
name: Get secrets | ||
with: | ||
aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
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,/production/common/releasing/digicert/client_cert_password = DIGICERT_CLIENT_CERT_PASSWORD,/production/common/releasing/digicert/code_signing_cert_sha1_hash = DIGICERT_CODE_SIGNING_CERT_SHA1_HASH' | ||
|
||
- name: Sign DLLs | ||
uses: launchdarkly/gh-actions/actions/sign-dlls@sign-dlls-v1.0.0 | ||
with: | ||
build_configuration_path: ${{ env.BUILD_OUTPUT_PATH }} | ||
dll_name: ${{ env.BUILD_OUTPUT_DLL_NAME }} | ||
|
||
- name: Retain signed artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dir-bin-release-signed | ||
path: ${{ env.BUILD_OUTPUT_PATH }} | ||
retention-days: 1 | ||
|
||
# Packing is done on Mac due to ios workload requirements. | ||
publish: | ||
runs-on: macos-latest | ||
needs: sign-dlls | ||
permissions: | ||
id-token: write | ||
contents: write | ||
outputs: | ||
hashes: ${{ steps.publish.outputs.hashes }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Env from project's Env file | ||
shell: bash | ||
run: echo "$(cat pkgs/sdk/client/github_actions.env)" >> $GITHUB_ENV | ||
|
||
- name: Restore release artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dir-bin-release-signed | ||
path: ${{ env.BUILD_OUTPUT_PATH }} | ||
|
||
- name: Restore docs artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dir-docs | ||
path: ${{ env.WORKSPACE_PATH }}/docs | ||
|
||
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0 | ||
name: Get secrets | ||
with: | ||
aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
ssm_parameter_pairs: '/production/common/releasing/nuget/api_key = NUGET_API_KEY' | ||
|
||
- name: Publish Nupkg | ||
id: publish | ||
uses: ./.github/actions/publish-package | ||
with: | ||
project_file: ${{ env.PROJECT_FILE }} | ||
dry_run: ${{ inputs.dry_run }} | ||
|
||
- name: Publish Documentation | ||
if: ${{ inputs.dry_run == 'false' }} | ||
uses: ./.github/actions/publish-docs | ||
with: | ||
workspace_path: ${{ env.WORKSPACE_PATH }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this structure comes from https://github.com/launchdarkly/dotnet-client-sdk/blob/main/.github/workflows/publish.yml
Weaved in hash outputs for provenance and using pkgs/sdk/client/github_actions.env to set up env variables to make it more consistent with dotnet-core workflow structure.