Skip to content

Commit d2aaf1c

Browse files
add build.yml action
1 parent 711cdfa commit d2aaf1c

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-6
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on:
2+
workflow_call: {}
3+
4+
name: Build
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
id-token: write
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- run: echo "nothing to do."
16+
shell: bash

.github/workflows/release.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ jobs:
2121
with:
2222
target-branch: main
2323

24-
ssdlc:
24+
build:
2525
needs: [release_please]
26+
name: "Perform any build or bundling steps, as necessary."
27+
uses: ./.github/workflows/build.yml
28+
29+
ssdlc:
30+
needs: [release_please, build]
2631
permissions:
2732
# required for all workflows
2833
security-events: write
@@ -35,12 +40,16 @@ jobs:
3540

3641
- name: Install Node and dependencies
3742
uses: baileympearson/drivers-github-tools/node/setup@add-signing-env-action-for-node
43+
with:
44+
ignore_install_scripts: false
3845

3946
- name: Load version and package info
4047
uses: baileympearson/drivers-github-tools/node/get_version_info@add-signing-env-action-for-node
48+
with:
49+
npm_package_name: mongodb-legacy
4150

4251
- name: actions/compress_sign_and_upload
43-
uses: baileympearson/drivers-github-tools/node/sign_js_only_package@add-signing-env-action-for-node
52+
uses: baileympearson/drivers-github-tools/node/sign_node_package@add-signing-env-action-for-node
4453
with:
4554
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
4655
aws_region_name: us-east-1
@@ -50,18 +59,26 @@ jobs:
5059

5160
- name: Copy sbom file to release assets
5261
shell: bash
62+
if: ${{ '' == '' }}
5363
run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
5464

65+
# only used for mongodb-client-encryption
66+
- name: Augment SBOM and copy to release assets
67+
if: ${{ '' != '' }}
68+
uses: mongodb-labs/drivers-github-tools/sbom@v2
69+
with:
70+
silk_asset_group: ''
71+
sbom_file_name: sbom.json
72+
5573
- name: Generate authorized pub report
5674
uses: mongodb-labs/drivers-github-tools/full-report@v2
5775
with:
5876
release_version: ${{ env.package_version }}
5977
product_name: mongodb-legacy
6078
sarif_report_target_ref: main
6179
third_party_dependency_tool: n/a
62-
# <package> and <package>.sig
63-
dist_filenames: ${{ env.package_file }}*
64-
token: ${{ github.token }}
80+
dist_filenames: artifacts/*
81+
token: ${{ github.token }}
6582
sbom_file_name: sbom.json
6683

6784
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
@@ -71,7 +88,7 @@ jobs:
7188
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
7289

7390
publish:
74-
needs: [release_please, ssdlc]
91+
needs: [release_please, ssdlc, build]
7592
environment: release
7693
runs-on: ubuntu-latest
7794
steps:

0 commit comments

Comments
 (0)