From 9101992fa44b4026525018c83c6e819fb009e7ef Mon Sep 17 00:00:00 2001 From: Daniel Schroeder Date: Mon, 18 Sep 2023 10:06:57 +0200 Subject: [PATCH] test package building on change (#162) --- .github/workflows/test.yml | 11 +++++++++++ lib/index.ts | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ce498b30..3fde3938 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,6 +39,17 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - name: Build source w/ jsii + uses: udondan/jsii-publish@v0.14.0 + with: + VERSION: ${{ steps.get_version.outputs.VERSION }} + BUILD_SOURCE: true + + - name: Build packages w/ jsii + uses: udondan/jsii-publish@v0.14.0 + with: + BUILD_PACKAGES: true + report-status: name: success runs-on: ubuntu-latest diff --git a/lib/index.ts b/lib/index.ts index b660a2be..9aeb5a75 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -204,8 +204,7 @@ export class KeyPair extends Construct implements ITaggable { } const stack = Stack.of(this).stackName; - this.prefix = - props.resourcePrefix !== undefined ? props.resourcePrefix : stack; + this.prefix = props.resourcePrefix ?? stack; if (this.prefix.length + cleanID.length > 62) // Cloudformation limits names to 63 characters. Annotations.of(this).addError(