Skip to content

Commit ecb9044

Browse files
wip
1 parent ac86fcf commit ecb9044

File tree

1 file changed

+43
-1
lines changed

1 file changed

+43
-1
lines changed

.github/workflows/build.yml

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,46 @@ jobs:
9797
npm_package_name: 'mongodb-client-encryption'
9898
- run: npm publish --provenance
9999
env:
100-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
100+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
101+
102+
generate_sarif_report:
103+
environment: release
104+
runs-on: ubuntu-latest
105+
# needs: [release_please]
106+
permissions:
107+
# required for all workflows
108+
security-events: write
109+
id-token: write
110+
contents: write
111+
112+
steps:
113+
- uses: actions/checkout@v4
114+
- name: Set up drivers-github-tools
115+
uses: mongodb-labs/drivers-github-tools/setup@v2
116+
with:
117+
aws_region_name: us-east-1
118+
aws_role_arn: ${{ secrets.aws_role_arn }}
119+
aws_secret_id: ${{ secrets.aws_secret_id }}
120+
121+
- name: "Generate Sarif Report"
122+
# TODO: Use v2 once it has been re-tagged to include this action
123+
uses: mongodb-labs/drivers-github-tools/code-scanning-export@main
124+
with:
125+
ref: main
126+
output-file: sarif-report.json
127+
128+
- name: Get release version and release package file name
129+
id: get_version
130+
shell: bash
131+
run: |
132+
package_version=$(jq --raw-output '.version' package.json)
133+
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
134+
135+
- name: actions/publish_asset_to_s3
136+
uses: mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@main
137+
with:
138+
version: ${{ steps.get_version.outputs.package_version }}
139+
product_name: mongodb-client-encryption
140+
file: sarif-report.json
141+
# dry_run: ${{ needs.release_please.outputs.release_created == '' }}
142+
dry_run: false

0 commit comments

Comments
 (0)