From b3eba5f164fc3d4429435b95f661b6570222a06e Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Tue, 26 Nov 2024 13:50:06 -0700 Subject: [PATCH] add ssdlc action --- .github/workflows/build.yml | 6 +- .github/workflows/release.yml | 108 +++++++++++++++++----------------- 2 files changed, 58 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3d038b..48ca177 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - linux_arch: [s390x, arm64, amd64] + linux_arch: [amd64] + # linux_arch: [s390x, arm64, amd64] fail-fast: false steps: - uses: actions/checkout@v4 @@ -84,7 +85,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - linux_arch: [amd64, arm64] + linux_arch: [amd64] + # linux_arch: [amd64, arm64] fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27e9152..a68e270 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,67 +26,67 @@ jobs: 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 - # id-token: write - # contents: write - # environment: release - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 + 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: mongodb-labs/drivers-github-tools/node/setup@v2 - # with: - # ignore_install_scripts: true + - name: Install Node and dependencies + uses: mongodb-labs/drivers-github-tools/node/setup@v2 + with: + ignore_install_scripts: true - # - name: Load version and package info - # uses: mongodb-labs/drivers-github-tools/node/get_version_info@v2 - # with: - # npm_package_name: mongodb-client-encryption + - name: Load version and package info + uses: mongodb-labs/drivers-github-tools/node/get_version_info@v2 + with: + npm_package_name: "@mongodb-js/zstd" - # - name: actions/compress_sign_and_upload - # uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v2 - # with: - # aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} - # aws_region_name: us-east-1 - # aws_secret_id: ${{ secrets.AWS_SECRET_ID }} - # npm_package_name: mongodb-client-encryption - # dry_run: ${{ needs.release_please.outputs.release_created == '' }} - # sign_native: true + - name: actions/compress_sign_and_upload + uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v2 + with: + aws_role_arn: ${{ secrets.AWS_ROLE_ARN }} + aws_region_name: us-east-1 + aws_secret_id: ${{ secrets.AWS_SECRET_ID }} + npm_package_name: "@mongodb-js/zstd" + dry_run: ${{ needs.release_please.outputs.release_created == '' }} + sign_native: true - # - name: Copy sbom file to release assets - # shell: bash - # if: ${{ 'mongodb-client-encryption-6.1' == '' }} - # run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json + - name: Copy sbom file to release assets + shell: bash + if: ${{ 'node-zstd' == '' }} + run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json - # # only used for mongodb-client-encryption - # - name: Augment SBOM and copy to release assets - # if: ${{ 'mongodb-client-encryption-6.1' != '' }} - # uses: mongodb-labs/drivers-github-tools/sbom@v2 - # with: - # silk_asset_group: 'mongodb-client-encryption-6.1' - # sbom_file_name: sbom.json + # only used for mongodb-client-encryption + - name: Augment SBOM and copy to release assets + if: ${{ 'node-zstd' != '' }} + uses: mongodb-labs/drivers-github-tools/sbom@v2 + with: + silk_asset_group: "node-zstd" + 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-client-encryption - # sarif_report_target_ref: main - # third_party_dependency_tool: n/a - # dist_filenames: artifacts/* - # token: ${{ github.token }} - # 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-js/zstd" + sarif_report_target_ref: main + third_party_dependency_tool: n/a + 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: mongodb-client-encryption - # dry_run: ${{ needs.release_please.outputs.release_created == '' }} + - uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2 + with: + version: ${{ env.package_version }} + product_name: "@mongodb-js/zstd" + dry_run: ${{ needs.release_please.outputs.release_created == '' }} # publish: # needs: [release_please, ssdlc, build]