From aa036cef4eece61cb2dfd5580dc48c3c77ee4211 Mon Sep 17 00:00:00 2001 From: bailey Date: Tue, 4 Nov 2025 16:57:19 -0500 Subject: [PATCH 1/2] prepare for pre-release --- .github/pull_request_template.md | 2 +- .github/workflows/release_6.1.yml | 106 ------------------------------ release-please-config.json | 4 +- 3 files changed, 2 insertions(+), 110 deletions(-) delete mode 100644 .github/workflows/release_6.1.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c78fb22..1fd9216 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -15,7 +15,7 @@ Otherwise, feel free to remove this section. #### What is the motivation for this change? diff --git a/.github/workflows/release_6.1.yml b/.github/workflows/release_6.1.yml deleted file mode 100644 index 3858226..0000000 --- a/.github/workflows/release_6.1.yml +++ /dev/null @@ -1,106 +0,0 @@ -on: - push: - branches: ["main"] - workflow_dispatch: {} - -permissions: - contents: write - pull-requests: write - id-token: write - -name: release - -jobs: - release_please: - runs-on: ubuntu-latest - outputs: - release_created: ${{ steps.release.outputs.release_created }} - steps: - - id: release - uses: googleapis/release-please-action@v4 - with: - target-branch: main - - 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 - id-token: write - contents: write - environment: release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - name: Install Node and dependencies - uses: mongodb-labs/drivers-github-tools/node/setup@v3 - with: - ignore_install_scripts: true - - - name: Load version and package info - uses: mongodb-labs/drivers-github-tools/node/get_version_info@v3 - with: - npm_package_name: mongodb-client-encryption - - - name: actions/compress_sign_and_upload - uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v3 - 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: Copy sbom file to release assets - shell: bash - if: ${{ 'mongodb-client-encryption-6.1' == '' }} - 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@v3 - with: - silk_asset_group: 'mongodb-client-encryption-6.1' - sbom_file_name: sbom.json - - - name: Generate authorized pub report - uses: mongodb-labs/drivers-github-tools/full-report@v3 - 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 - - - uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v3 - with: - version: ${{ env.package_version }} - product_name: mongodb-client-encryption - dry_run: ${{ needs.release_please.outputs.release_created == '' }} - - publish: - needs: [release_please, ssdlc, build] - environment: release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - - name: Install Node and dependencies - uses: mongodb-labs/drivers-github-tools/node/setup@v3 - with: - ignore_install_scripts: true - - - run: npm publish --provenance --tag alpha - if: ${{ needs.release_please.outputs.release_created }} - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/release-please-config.json b/release-please-config.json index 527f3e3..5b5f2c1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -8,9 +8,7 @@ "bump-minor-pre-major": false, "bump-patch-for-minor-pre-major": false, "draft": false, - "prerelease-type": "alpha", - "prerelease": true, - "versioning": "prerelease" + "prerelease": true } }, "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" From 37e7ada1dee435e01f4676cc89d6ba4e1d70cd2a Mon Sep 17 00:00:00 2001 From: bailey Date: Tue, 4 Nov 2025 16:58:25 -0500 Subject: [PATCH 2/2] add relase action --- .github/workflows/release.yml | 106 ++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..bd938a9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,106 @@ +on: + push: + branches: ["main"] + workflow_dispatch: {} + +permissions: + contents: write + pull-requests: write + id-token: write + +name: release + +jobs: + release_please: + runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} + steps: + - id: release + uses: googleapis/release-please-action@v4 + with: + target-branch: main + + 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 + id-token: write + contents: write + environment: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Install Node and dependencies + uses: mongodb-labs/drivers-github-tools/node/setup@v3 + with: + ignore_install_scripts: true + + - name: Load version and package info + uses: mongodb-labs/drivers-github-tools/node/get_version_info@v3 + with: + npm_package_name: mongodb-client-encryption + + - name: actions/compress_sign_and_upload + uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v3 + 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: Copy sbom file to release assets + shell: bash + if: ${{ 'mongodb-client-encryption-6.1' == '' }} + 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@v3 + with: + silk_asset_group: 'mongodb-client-encryption-6.1' + sbom_file_name: sbom.json + + - name: Generate authorized pub report + uses: mongodb-labs/drivers-github-tools/full-report@v3 + 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 + + - uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v3 + with: + version: ${{ env.package_version }} + product_name: mongodb-client-encryption + dry_run: ${{ needs.release_please.outputs.release_created == '' }} + + publish: + needs: [release_please, ssdlc, build] + environment: release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Install Node and dependencies + uses: mongodb-labs/drivers-github-tools/node/setup@v3 + with: + ignore_install_scripts: true + + - run: npm publish --provenance --tag latest + if: ${{ needs.release_please.outputs.release_created }} + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}