Skip to content

Commit

Permalink
use shared actions
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jun 24, 2024
1 parent 06ed907 commit e76d143
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 85 deletions.
59 changes: 0 additions & 59 deletions .github/actions/compress_sign_and_upload/action.yml

This file was deleted.

23 changes: 10 additions & 13 deletions .github/workflows/release-5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: actions/setup
uses: ./.github/actions/setup
- name: Get release version and release package file name
id: get_version
shell: bash
run: |
package_version=$(jq --raw-output '.version' package.json)
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
echo "package_file=bson-${package_version}.tgz" >> "$GITHUB_OUTPUT"

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

- name: actions/compress_sign_and_upload
uses: ./.github/actions/compress_sign_and_upload
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_region_name: us-east-1
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
npm_package_name: 'bson'
npm_package_name: bson
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

- name: Copy sbom file to release assets
Expand All @@ -58,17 +55,17 @@ jobs:
- name: Generate authorized pub report
uses: mongodb-labs/drivers-github-tools/full-report@v2
with:
release_version: ${{ steps.get_version.outputs.package_version }}
release_version: ${{ env.package_version.package_version }}
product_name: bson
sarif_report_target_ref: 5.x
third_party_dependency_tool: n/a
# <package> and <package>.sig
dist_filenames: ${{ steps.get_version.outputs.package_file }}*
dist_filenames: ${{ env.package_version.package_file }}*
token: ${{ github.token }}
sbom_file_name: sbom.json
- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
with:
version: ${{ steps.get_version.outputs.package_version }}
version: ${{ env.package_version.package_version }}
product_name: bson
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: actions/setup
uses: ./.github/actions/setup
- name: Get release version and release package file name
id: get_version
shell: bash
run: |
package_version=$(jq --raw-output '.version' package.json)
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
echo "package_file=bson-${package_version}.tgz" >> "$GITHUB_OUTPUT"

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

- name: actions/compress_sign_and_upload
uses: ./.github/actions/compress_sign_and_upload
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_region_name: us-east-1
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
npm_package_name: 'bson'
npm_package_name: bson
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

- name: Copy sbom file to release assets
Expand All @@ -56,18 +53,18 @@ jobs:
- name: Generate authorized pub report
uses: mongodb-labs/drivers-github-tools/full-report@v2
with:
release_version: ${{ steps.get_version.outputs.package_version }}
release_version: ${{ env.package_version }}
product_name: bson
sarif_report_target_ref: main
third_party_dependency_tool: n/a
# <package> and <package>.sig
dist_filenames: ${{ steps.get_version.outputs.package_file }}*
dist_filenames: ${{ env.package_version.package_file }}*
token: ${{ github.token }}
sbom_file_name: sbom.json

- uses: mongodb-labs/drivers-github-tools/upload-s3-assets@v2
with:
version: ${{ steps.get_version.outputs.package_version }}
version: ${{ env.package_version.package_version }}
product_name: bson
dry_run: ${{ needs.release_please.outputs.release_created == '' }}

Expand Down

0 comments on commit e76d143

Please sign in to comment.