Skip to content

Commit 829ff4d

Browse files
hopefully passing action
1 parent 12ec664 commit 829ff4d

File tree

5 files changed

+220
-88
lines changed

5 files changed

+220
-88
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/actions/sign_and_upload_package/action.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
on:
2-
push:
3-
branches: [main]
42
pull_request:
53
branches: [main]
64
workflow_dispatch: {}
5+
workflow_call: {}
76

87
name: Build and Test
98

.github/workflows/release.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
on:
2+
push:
3+
branches: ["6.1"]
4+
pull_request:
5+
branches: ["main"]
6+
workflow_dispatch: {}
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
id-token: write
12+
13+
name: release-6.1
14+
15+
jobs:
16+
release_please:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
release_created: ${{ steps.release.outputs.release_created }}
20+
steps:
21+
- id: release
22+
uses: googleapis/release-please-action@v4
23+
with:
24+
target-branch: 6.1
25+
26+
build:
27+
needs: [release_please]
28+
name: "Perform any build or bundling steps, as necessary."
29+
uses: ./.github/workflows/build.yml
30+
31+
ssdlc:
32+
needs: [release_please, build]
33+
permissions:
34+
# required for all workflows
35+
security-events: write
36+
id-token: write
37+
contents: write
38+
environment: release
39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Install Node and dependencies
44+
uses: mongodb-labs/drivers-github-tools/node/setup@v2
45+
with:
46+
ignore_install_scripts: true
47+
48+
- name: Load version and package info
49+
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v2
50+
with:
51+
npm_package_name: mongodb-client-encryption
52+
53+
- name: actions/compress_sign_and_upload
54+
uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v2
55+
with:
56+
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
57+
aws_region_name: us-east-1
58+
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
59+
npm_package_name: mongodb-client-encryption
60+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
61+
62+
- name: Copy sbom file to release assets
63+
shell: bash
64+
if: ${{ 'mongodb-client-encryption-6.1' == '' }}
65+
run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
66+
67+
# only used for mongodb-client-encryption
68+
- name: Augment SBOM and copy to release assets
69+
if: ${{ 'mongodb-client-encryption-6.1' != '' }}
70+
uses: mongodb-labs/drivers-github-tools/sbom@v2
71+
with:
72+
silk_asset_group: 'mongodb-client-encryption-6.1'
73+
sbom_file_name: sbom.json
74+
75+
- name: Generate authorized pub report
76+
uses: mongodb-labs/drivers-github-tools/full-report@v2
77+
with:
78+
release_version: ${{ env.package_version }}
79+
product_name: mongodb-client-encryption
80+
sarif_report_target_ref: 6.1
81+
third_party_dependency_tool: n/a
82+
dist_filenames: artifacts/*
83+
token: ${{ github.token }}
84+
sbom_file_name: sbom.json
85+
86+
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
87+
with:
88+
version: ${{ env.package_version }}
89+
product_name: mongodb-client-encryption
90+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
91+
92+
publish:
93+
needs: [release_please, ssdlc, build]
94+
environment: release
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- name: Install Node and dependencies
100+
uses: mongodb-labs/drivers-github-tools/node/setup@v2
101+
102+
- run: npm publish --provenance --tag=6.1
103+
if: ${{ needs.release_please.outputs.release_created }}
104+
env:
105+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release_6.1.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
on:
2+
push:
3+
branches: ["6.1"]
4+
workflow_dispatch: {}
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
id-token: write
10+
11+
name: release-6.1
12+
13+
jobs:
14+
release_please:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
release_created: ${{ steps.release.outputs.release_created }}
18+
steps:
19+
- id: release
20+
uses: googleapis/release-please-action@v4
21+
with:
22+
target-branch: 6.1
23+
24+
build:
25+
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]
31+
permissions:
32+
# required for all workflows
33+
security-events: write
34+
id-token: write
35+
contents: write
36+
environment: release
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- name: Install Node and dependencies
42+
uses: mongodb-labs/drivers-github-tools/node/setup@v2
43+
with:
44+
ignore_install_scripts: true
45+
46+
- name: Load version and package info
47+
uses: mongodb-labs/drivers-github-tools/node/get_version_info@v2
48+
with:
49+
npm_package_name: mongodb-client-encryption
50+
51+
- name: actions/compress_sign_and_upload
52+
uses: mongodb-labs/drivers-github-tools/node/sign_node_package@v2
53+
with:
54+
aws_role_arn: ${{ secrets.AWS_ROLE_ARN }}
55+
aws_region_name: us-east-1
56+
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
57+
npm_package_name: mongodb-client-encryption
58+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
59+
60+
- name: Download the Augmented SBOM file to the release assets and s3 assets folders
61+
shell: bash
62+
run: |
63+
set -eu
64+
SILKBOMB_ENVFILE=/tmp/silkbomb-envfile
65+
cat << EOF > $SILKBOMB_ENVFILE
66+
SILK_CLIENT_ID=${SILKBOMB_USER}
67+
SILK_CLIENT_SECRET=${SILKBOMB_KEY}
68+
EOF
69+
echo 'SILKBOMB_ENVFILE=$SILKBOMB_ENVFILE' >> $GITHUB_ENV
70+
71+
- name: Copy sbom file to release assets
72+
shell: bash
73+
if: ${{ 'mongodb-client-encryption-6.1' == '' }}
74+
run: cp sbom.json ${{ env.S3_ASSETS }}/sbom.json
75+
76+
# only used for mongodb-client-encryption
77+
- name: Augment SBOM and copy to release assets
78+
if: ${{ 'mongodb-client-encryption-6.1' != '' }}
79+
uses: mongodb-labs/drivers-github-tools/sbom@v2
80+
with:
81+
silk_asset_group: 'mongodb-client-encryption-6.1'
82+
sbom_file_name: sbom.json
83+
84+
- name: Generate authorized pub report
85+
uses: mongodb-labs/drivers-github-tools/full-report@v2
86+
with:
87+
release_version: ${{ env.package_version }}
88+
product_name: mongodb-client-encryption
89+
sarif_report_target_ref: 6.1
90+
third_party_dependency_tool: n/a
91+
dist_filenames: artifacts/*
92+
token: ${{ github.token }}
93+
sbom_file_name: sbom.json
94+
95+
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
96+
with:
97+
version: ${{ env.package_version }}
98+
product_name: mongodb-client-encryption
99+
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
100+
101+
publish:
102+
needs: [release_please, ssdlc, build]
103+
environment: release
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: actions/checkout@v4
107+
108+
- name: Install Node and dependencies
109+
uses: mongodb-labs/drivers-github-tools/node/setup@v2
110+
111+
- run: npm publish --provenance --tag=6.1
112+
if: ${{ needs.release_please.outputs.release_created }}
113+
env:
114+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)