Skip to content

Commit ff5abc1

Browse files
feat: add prepare script to ensure builds before publishing
1 parent 9aa7a46 commit ff5abc1

5 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/actions/npm-publish/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828

2929
- name: Install dependencies
3030
shell: bash
31-
run: npm ci --include=dev
31+
run: npm ci --include=dev --ignore-scripts
3232

3333
- name: Build package
3434
if: inputs.require-build == 'true'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
needs: rl-scanner
3434
with:
3535
node-version: 18
36-
require-build: true
36+
require-build: false
3737
secrets:
3838
npm-token: ${{ secrets.NPM_TOKEN }}
3939
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/rl-secure.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Install dependencies
4141
shell: bash
42-
run: npm ci --include=dev
42+
run: npm ci --include=dev --ignore-scripts
4343

4444
- name: Build
4545
shell: bash
@@ -56,8 +56,8 @@ jobs:
5656
id: rl-scan-conclusion
5757
uses: ./.github/actions/rl-scanner
5858
with:
59-
artifact-path: "$(pwd)/${{ inputs.artifact-name }}"
60-
version: "${{ steps.get_version.outputs.version }}"
59+
artifact-path: '$(pwd)/${{ inputs.artifact-name }}'
60+
version: '${{ steps.get_version.outputs.version }}'
6161
env:
6262
RLSECURE_LICENSE: ${{ secrets.RLSECURE_LICENSE }}
6363
RLSECURE_SITE_KEY: ${{ secrets.RLSECURE_SITE_KEY }}
@@ -67,4 +67,4 @@ jobs:
6767
PRODSEC_TOOLS_ARN: ${{ secrets.PRODSEC_TOOLS_ARN }}
6868

6969
- name: Output scan result
70-
run: echo "scan-status=${{ steps.rl-scan-conclusion.outcome }}" >> $GITHUB_ENV
70+
run: echo "scan-status=${{ steps.rl-scan-conclusion.outcome }}" >> $GITHUB_ENV

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939

4040
- name: Install dependencies
4141
shell: bash
42-
run: npm ci --include=dev
42+
run: npm ci --include=dev --ignore-scripts
4343

4444
- name: ESLint
4545
shell: bash

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"precommit": "pretty-quick --staged",
3131
"lint": "eslint ./src ./test --ext ts",
3232
"lint:package": "publint",
33+
"prepare": "npm run build",
3334
"start:playground": "node --experimental-specifier-resolution=node --no-warnings --loader ts-node/esm playground/index.ts"
3435
},
3536
"repository": {

0 commit comments

Comments
 (0)