Skip to content

Commit

Permalink
add SSDLC action for Node
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 25, 2024
1 parent 2b7718c commit 7e38073
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: {}

name: Release
Expand All @@ -24,6 +26,58 @@ jobs:
name: "Build native code"
uses: ./.github/workflows/build.yml

ssdlc:
needs: [release_please, build]
permissions:
# required for all workflows
security-events: write
id-token: write
contents: write
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- 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: kerberos

- name: actions/sign_and_upload_package
uses: baileympearson/drivers-github-tools/node/sign_js_only_package@add-signing-env-action-for-node
with:
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
aws_region_name: 'us-east-1'
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
npm_package_name: kerberos
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
sign_native: true

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

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

- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
with:
version: ${{ env.package_version }}
product_name: kerberos
dry_run: false

publish:
needs: [release_please, build]
environment: release
Expand Down

0 comments on commit 7e38073

Please sign in to comment.