diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index fdd3c72..805c117 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -32,6 +32,7 @@ jobs: - name: Run semantic release run: | npm ci + npm run build npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dabf6c0..52092e9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,10 +25,10 @@ jobs: - name: Check format, lint and build from source run: | - npm ci + npm ci --ignore-scripts npm run format:check npm run lint:check - npm run build + npx tsc # TODO: add test step test-lambda-functions: @@ -50,8 +50,8 @@ jobs: - name: Check format, lint and build from source working-directory: ./lambda-functions run: | - npm ci + npm ci --ignore-scripts npm run format:check npm run lint:check - npm run build + npx tsc # TODO: add test step diff --git a/package.json b/package.json index 578e703..a05bffc 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,9 @@ "!dist/*.tsbuildinfo" ], "scripts": { - "build": "tsc", - "prepack": "tsc; cd lambda-functions; npm ci; npm run build; cp -r dist ../dist/constructs/lambda/assets", + "postinstall": "cd lambda-functions; npm ci", + "build": "tsc; cd lambda-functions; npm run build", + "postbuild": "cp -r lambda-functions/dist dist/constructs/lambda/assets", "test": "jest", "format": "prettier --write '{.github,lib,test}/**' '*.json'", "format:check": "prettier --check '{.github,lib,test}/**' '*.json'",