@@ -18,11 +18,14 @@ jobs:
1818 steps :
1919 - id : release
2020 uses : googleapis/release-please-action@v4
21- with :
22- target-branch : 5.x
2321
24- compress_sign_and_upload :
22+ ssdlc :
2523 needs : [release_please]
24+ permissions :
25+ # required for all workflows
26+ security-events : write
27+ id-token : write
28+ contents : write
2629 environment : release
2730 runs-on : ubuntu-latest
2831 steps :
@@ -46,140 +49,38 @@ jobs:
4649 npm_package_name : ' mongodb'
4750 dry_run : ${{ needs.release_please.outputs.release_created == '' }}
4851
52+ - name : Copy sbom file to release assets
53+ shell : bash
54+ run : cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
55+
4956 - name : Generate authorized pub report
50- uses : mongodb-labs /drivers-github-tools/authorized-pub@v2
57+ uses : baileympearson /drivers-github-tools/full-report@adjust-shared-actions-for-node
5158 with :
5259 release_version : ${{ steps.get_version.outputs.package_version }}
5360 product_name : node-mongodb-native
61+ sarif_report_target_ref : 5.x
5462 # <package> and <package>.sig
55- filenames : ${{ steps.get_vars.outputs.package_file }}*
63+ dist_filenames : ${{ steps.get_vars.outputs.package_file }}*
5664 token : ${{ github.token }}
65+ sbom_file_name : sbom.json
5766
58- - name : actions/publish_asset_to_s3
59- uses : mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@v2
67+ - uses : baileympearson/drivers-github-tools/upload-s3-assets@adjust-shared-actions-for-node
6068 with :
61- version : ${{ steps.get_version.outputs.package_version }}
62- product_name : node-mongodb-native
63- file : ${{env.S3_ASSETS}}/authorized-publication.txt
69+ version : ${{ inputs.version }}
70+ product_name : ${{ inputs.product_name }}
6471 dry_run : ${{ needs.release_please.outputs.release_created == '' }}
6572
66- - run : npm publish --provenance --tag=5x
67- if : ${{ needs.release_please.outputs.release_created }}
68- env :
69- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
7073
71- generate_sarif_report :
74+ publish :
75+ needs : [release_please, ssdlc]
7276 environment : release
7377 runs-on : ubuntu-latest
74- needs : [release_please]
75- permissions :
76- # required for all workflows
77- security-events : write
78- id-token : write
79- contents : write
80-
81- steps :
82- - uses : actions/checkout@v4
83- - name : Set up drivers-github-tools
84- uses : mongodb-labs/drivers-github-tools/setup@v2
85- with :
86- aws_region_name : us-east-1
87- aws_role_arn : ${{ secrets.aws_role_arn }}
88- aws_secret_id : ${{ secrets.aws_secret_id }}
89-
90- - name : " Generate Sarif Report"
91- uses : mongodb-labs/drivers-github-tools/code-scanning-export@v2
92- with :
93- ref : 5.x
94- output-file : sarif-report.json
95-
96- - name : Get release version and release package file name
97- id : get_version
98- shell : bash
99- run : |
100- package_version=$(jq --raw-output '.version' package.json)
101- echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
102- - name : actions/publish_asset_to_s3
103- uses : mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@v2
104- with :
105- version : ${{ steps.get_version.outputs.package_version }}
106- product_name : node-mongodb-native
107- file : sarif-report.json
108- dry_run : ${{ needs.release_please.outputs.release_created == '' }}
109-
110- upload_sbom_lite :
111- environment : release
112- runs-on : ubuntu-latest
113- needs : [release_please]
114- permissions :
115- # required for all workflows
116- security-events : write
117- id-token : write
118- contents : write
119-
12078 steps :
12179 - uses : actions/checkout@v4
122- - name : Set up drivers-github-tools
123- uses : mongodb-labs/drivers-github-tools/setup@v2
124- with :
125- aws_region_name : us-east-1
126- aws_role_arn : ${{ secrets.aws_role_arn }}
127- aws_secret_id : ${{ secrets.aws_secret_id }}
128-
129- - name : Get release version and release package file name
130- id : get_version
131- shell : bash
132- run : |
133- package_version=$(jq --raw-output '.version' package.json)
134- echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
135-
136- - name : actions/publish_asset_to_s3
137- uses : mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@v2
138- with :
139- version : ${{ steps.get_version.outputs.package_version }}
140- product_name : node-mongodb-native
141- file : sbom.json
142- dry_run : ${{ needs.release_please.outputs.release_created == '' }}
143-
144- generate_compliance_report :
145- environment : release
146- runs-on : ubuntu-latest
147- needs : [release_please]
148- permissions :
149- # required for all workflows
150- security-events : write
151- id-token : write
152- contents : write
153-
154- steps :
155- - uses : actions/checkout@v4
156- - name : Set up drivers-github-tools
157- uses : mongodb-labs/drivers-github-tools/setup@v2
158- with :
159- aws_region_name : us-east-1
160- aws_role_arn : ${{ secrets.aws_role_arn }}
161- aws_secret_id : ${{ secrets.aws_secret_id }}
162-
163- - name : Get release version and release package file name
164- id : get_version
165- shell : bash
166- run : |
167- package_version=$(jq --raw-output '.version' package.json)
168- echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
169-
170- - name : Generate compliance report
171- uses : mongodb-labs/drivers-github-tools/compliance-report@v2
172- with :
173- sbom_name : sbom.json
174- sarif_name : sarif-report.json
175- security_report_location : tbd
176- release_version : ${{ steps.get_version.outputs.package_version }}
177- token : ${{ github.token }}
80+ - name : actions/setup
81+ uses : ./.github/actions/setup
17882
179- - name : actions/publish_asset_to_s3
180- uses : mongodb-labs/drivers-github-tools/node/publish_asset_to_s3@v2
181- with :
182- version : ${{ steps.get_version.outputs.package_version }}
183- product_name : node-mongodb-native
184- file : ${{env.S3_ASSETS}}/ssdlc_compliance_report.txt
185- dry_run : ${{ needs.release_please.outputs.release_created == '' }}
83+ - run : npm publish --provenance --tag=5.x
84+ if : ${{ needs.release_please.outputs.release_created }}
85+ env :
86+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments