Repository: udondan/cdk-ec2-key-pair (language: python)

Issue:
Lambda Code is not bundled with package
Trying to upgrade to the newest version, I get the following error

```
Error: Cannot find asset at /Users/someone/code/node_modules/cdk-ec2-key-pair/lambda/code.zip
    at new AssetStaging (/Users/someone/code/node_modules/aws-cdk-lib/core/lib/asset-staging.js:1:2119)
    at new Asset (/Users/someone/code/node_modules/aws-cdk-lib/aws-s3-assets/lib/asset.js:1:1080)
    at AssetCode.bind (/Users/someone/code/node_modules/aws-cdk-lib/aws-lambda/lib/code.js:1:4881)
    at new Function (/Users/someone/code/node_modules/aws-cdk-lib/aws-lambda/lib/function.js:1:9422)
    at KeyPair.ensureLambda (/Users/someone/code/node_modules/cdk-ec2-key-pair/lib/index.ts:419:16)
    at new KeyPair (/Users/someone/code/node_modules/cdk-ec2-key-pair/lib/index.ts:271:32)
    at new CommonStack (/Users/someone/code/lib/stacks/common/index.ts:43:27)
    at App.buildBase (/Users/someone/code/lib/app.ts:41:20)
    at new App (/Users/someone/code/lib/app.ts:25:23)
    at Object.<anonymous> (/Users/someone/code/bin/cdk.ts:20:1)
```

I don't see the code.zip bundled in the npm package

![Screenshot 2024-03-25 at 9 35 30 AM](https://github.com/udondan/cdk-ec2-key-pair/assets/101210544/043154ec-5098-441d-8e8a-f40eaa53ad81)



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b622ded0..91b7598a 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -27,7 +27,10 @@ jobs:
           sudo apt-get install -y tree
 
       - name: Build source w/ jsii
-        run: npx jsii
+        run: |
+          lambda/build
+          npx jsii
+          make validate-package
 
       - name: Build packages w/ jsii-pacmak
         run: |
diff --git a/.npmignore b/.npmignore
index 0bca0edb..f85d678a 100644
--- a/.npmignore
+++ b/.npmignore
@@ -26,6 +26,7 @@ tsconfig.tsbuildinfo
 .eslintrc
 .prettierrc
 tsconfig-lint.json
+publish_output.txt
 
 lambda/*
 !lambda/code.zip
diff --git a/Makefile b/Makefile
index 5349418f..319503db 100644
--- a/Makefile
+++ b/Makefile
@@ -24,3 +24,21 @@ eslint:
 	@echo -e "$(TARGET_COLOR)Running eslint $$(npx eslint --version)$(NO_COLOR)"
 	@npx eslint .; \
 	echo "Passed"
+
+validate-package:
+	@echo -e "$(TARGET_COLOR)Checking package content$(NO_COLOR)"
+	@npm publish --dry-run 2>&1 | tee publish_output.txt
+	@\
+	FILES_TO_CHECK="lambda/code.zip lib/index.d.ts lib/index.js lib/types.d.ts lib/types.js"; \
+	MISSING_FILES=""; \
+	for file in $$FILES_TO_CHECK; do \
+		if ! grep -q $$file publish_output.txt; then \
+			MISSING_FILES="$$MISSING_FILES $$file"; \
+		fi; \
+	done; \
+	if [ -n "$$MISSING_FILES" ]; then \
+		echo "❌ The following files are NOT included in the package:$$MISSING_FILES"; \
+		rm publish_output.txt; \
+		exit 1; \
+	fi
+	@rm publish_output.txt


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 820f8cff..bbe36386 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -92,7 +92,10 @@ jobs:
           AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
 
       - name: Build source w/ jsii
-        run: npx jsii
+        run: |
+          lambda/build
+          npx jsii
+          make validate-package
 
       - name: Build packages w/ jsii-pacmak
         run: |