Skip to content

Commit

Permalink
add build.yml action
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 26, 2024
1 parent 711cdfa commit d2aaf1c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
workflow_call: {}

name: Build

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "nothing to do."
shell: bash
29 changes: 23 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ jobs:
with:
target-branch: main

ssdlc:
build:
needs: [release_please]
name: "Perform any build or bundling steps, as necessary."
uses: ./.github/workflows/build.yml

ssdlc:
needs: [release_please, build]
permissions:
# required for all workflows
security-events: write
Expand All @@ -35,12 +40,16 @@ jobs:

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

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

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

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

# only used for mongodb-client-encryption
- name: Augment SBOM and copy to release assets
if: ${{ '' != '' }}
uses: mongodb-labs/drivers-github-tools/sbom@v2
with:
silk_asset_group: ''
sbom_file_name: sbom.json

- name: Generate authorized pub report
uses: mongodb-labs/drivers-github-tools/full-report@v2
with:
release_version: ${{ env.package_version }}
product_name: mongodb-legacy
sarif_report_target_ref: main
third_party_dependency_tool: n/a
# <package> and <package>.sig
dist_filenames: ${{ env.package_file }}*
token: ${{ github.token }}
dist_filenames: artifacts/*
token: ${{ github.token }}
sbom_file_name: sbom.json

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

publish:
needs: [release_please, ssdlc]
needs: [release_please, ssdlc, build]
environment: release
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit d2aaf1c

Please sign in to comment.