-
Notifications
You must be signed in to change notification settings - Fork 11
ci: adding release please support #4
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
Changes from all commits
368fa8a
7d5691b
5bcf8b3
82d8470
1d7864b
a2d322e
aa985c7
ed62c09
88b91d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,8 +17,6 @@ inputs: | |
| description: 'The Java distribution to use.' | ||
| required: false | ||
| default: 'temurin' | ||
| echo_test: | ||
| required: false | ||
|
|
||
| runs: | ||
| using: composite | ||
|
|
@@ -29,10 +27,6 @@ runs: | |
| distribution: ${{ inputs.java_distribution }} | ||
| java-version: ${{ inputs.java_version }} | ||
|
|
||
| -name: Echo Test | ||
| shell: bash | ||
| run: echo ${{ inputs.echo_test }} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reviewers: This was part of testing secrets redaction that merged to main temporarily. Is now removed. |
||
|
|
||
| - name: Restore dependencies | ||
| shell: bash | ||
| id: restore | ||
|
|
@@ -47,3 +41,7 @@ runs: | |
| if: steps.build.outcome == 'success' && inputs.run_tests == 'true' | ||
| shell: bash | ||
| run: ${{ inputs.workspace_path }}/gradlew test -p ${{ inputs.workspace_path }} | ||
|
|
||
| - name: Build Documentation | ||
| shell: bash | ||
| run: ${{ inputs.workspace_path }}/gradlew javadoc -p ${{ inputs.workspace_path }} | ||
cwaldren-ld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| name: Build, Test, and Publish | ||
| description: 'Execute the full release process for a workspace.' | ||
| inputs: | ||
| workspace_path: | ||
| description: 'Path to the workspace.' | ||
| required: true | ||
| dry_run: | ||
| description: 'Is this a dry run. If so no package will be published.' | ||
| required: true | ||
| prerelease: | ||
| description: 'Is this a prerelease. If so then it will be published to the staging repository only.' | ||
| required: true | ||
| signing_key_id: | ||
| description: 'Signing key ID' | ||
| required: true | ||
| signing_key_passphrase: | ||
| description: 'Signing key passphrase' | ||
| required: true | ||
| code_signing_keyring: | ||
| description: 'The path of the code signing keyring.' | ||
| required: true | ||
| sonatype_username: | ||
| description: 'Sonatype repo username.' | ||
| required: true | ||
| sonatype_password: | ||
| description: 'Sonatype repo password.' | ||
| 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: | ||
| using: composite | ||
| steps: | ||
| - name: CI Check | ||
| uses: ./.github/actions/ci | ||
| with: | ||
| workspace_path: ${{ inputs.workspace_path }} | ||
| java_version: 8 | ||
|
|
||
| - name: Publish | ||
| uses: ./.github/actions/publish | ||
| with: | ||
| workspace_path: ${{ inputs.workspace_path }} | ||
| dry_run: ${{ inputs.dry_run }} | ||
| prerelease: ${{ inputs.prerelease }} | ||
| signing_key_id: ${{ env.SIGNING_KEY_ID }} | ||
| signing_key_passphrase: ${{ env.SIGNING_KEY_PASSPHRASE }} | ||
| code_signing_keyring: 'code-signing-keyring.gpg' | ||
| sonatype_username: ${{ env.SONATYPE_USER_NAME }} | ||
tanderson-ld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| sonatype_password: ${{ env.SONATYPE_PASSWORD }} | ||
|
|
||
| - name: Publish Documentation | ||
| uses: ./.github/actions/publish-docs | ||
| with: | ||
| workspace_path: ${{ inputs.workspace_path }} | ||
| token: ${{ inputs.token }} | ||
| dry_run: ${{ inputs.dry_run }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Publish Documentation | ||
| description: 'Publish the documentation to Github pages' | ||
| inputs: | ||
| workspace_path: | ||
| description: 'Path to the workspace.' | ||
| required: true | ||
| token: | ||
| description: 'Token to use for publishing.' | ||
| required: true | ||
| dry_run: | ||
tanderson-ld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description: 'Is this a dry run. If so no docs will be published.' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: launchdarkly/gh-actions/actions/publish-pages@publish-pages-v1.0.1 | ||
| name: 'Publish to Github pages' | ||
| if: ${{ inputs.dry_run == 'false' }} | ||
| with: | ||
| docs_path: ${{ workspace_path }}/build/docs/javadoc | ||
| output_path: ${{ workspace_path }} | ||
| github_token: ${{ inputs.token }} | ||
|
|
||
| - name: Dry Run Publish Docs | ||
| shell: bash | ||
| if: ${{ inputs.dry_run == 'true' }} | ||
| run: echo "Dry run. Not publishing docs." | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,19 +16,8 @@ jobs: | |
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.1.0 | ||
| name: Get secrets | ||
| with: | ||
| aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
| ssm_parameter_pairs: '/production/common/releasing/sonatype/username = SONATYPE_USER_NAME, | ||
| /production/common/releasing/sonatype/password = SONATYPE_PASSWORD, | ||
| /production/common/releasing/android_code_signing/private_key_id = SIGNING_KEY_ID, | ||
| /production/common/releasing/android_code_signing/private_key_passphrase = SIGNING_KEY_PASSPHRASE' | ||
| s3_path_pairs: 'launchdarkly-releaser/android/code-signing-keyring.gpg = code-signing-keyring.gpg' | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For reviewers: This was part of testing secrets redaction that merged to main temporarily. Is now removed. |
||
|
|
||
| - name: Shared CI Steps | ||
| uses: ./.github/actions/ci | ||
| with: | ||
| workspace_path: 'lib/java-server-sdk-otel' | ||
| java_version: 8 | ||
| echo_test: ${{ env.SIGNING_KEY_ID }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Release Please | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| release-please: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| outputs: | ||
| package-server-sdk-otel-released: ${{ steps.release.outputs['lib/java-server-sdk-otel--release_created'] }} | ||
|
|
||
| steps: | ||
| - uses: google-github-actions/release-please-action@v4 | ||
| id: release | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| target-branch: ${{ github.ref_name }} | ||
|
|
||
| release-server-sdk-otel: | ||
| runs-on: ubuntu-latest | ||
| needs: release-please | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| pull-requests: write | ||
| if: ${{ needs.release-please.outputs.package-server-sdk-otel-released == 'true'}} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.1.0 | ||
| name: Get secrets | ||
| with: | ||
| aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
| ssm_parameter_pairs: '/production/common/releasing/sonatype/username = SONATYPE_USER_NAME, | ||
| /production/common/releasing/sonatype/password = SONATYPE_PASSWORD, | ||
| /production/common/releasing/android_code_signing/private_key_id = SIGNING_KEY_ID, | ||
| /production/common/releasing/android_code_signing/private_key_passphrase = SIGNING_KEY_PASSPHRASE' | ||
| s3_path_pairs: 'launchdarkly-releaser/android/code-signing-keyring.gpg = code-signing-keyring.gpg' | ||
|
|
||
| - uses: ./.github/actions/full-release | ||
| with: | ||
| workspace_path: lib/java-server-sdk-otel | ||
| dry_run: true #TODO make this false | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Noting the TODOs.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. My intention is to merge this and test things out first. |
||
| prerelease: true #TODO make this false | ||
| code_signing_keyring: 'code-signing-keyring.gpg' | ||
| signing_key_id: ${{ env.SIGNING_KEY_ID }} | ||
| signing_key_passphrase: ${{ env.SIGNING_KEY_PASSPHRASE }} | ||
| sonatype_username: ${{ env.SONATYPE_USER_NAME }} | ||
| sonatype_password: ${{ env.SONATYPE_PASSWORD }} | ||
| aws_role: ${{ vars.AWS_ROLE_ARN }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "lib/java-server-sdk-otel": "0.1.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "bootstrap-sha": "4b8717e9622cd7789ded706470b7109e04ce6825", | ||
| "separate-pull-requests": true, | ||
| "include-component-in-tag": true, | ||
| "packages": { | ||
| "lib/java-server-sdk-otel": { | ||
| "release-type": "simple", | ||
| "bump-minor-pre-major": true, | ||
| "include-v-in-tag": false, | ||
| "extra-files": [ | ||
| "gradle.properties" | ||
| ] | ||
| } | ||
| } | ||
| } |
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.
For reviewers: This was part of testing secrets redaction that merged to main temporarily. Is now removed.