Skip to content

Commit 2456371

Browse files
make action sharable
1 parent cd742ec commit 2456371

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

.github/actions/sign_and_upload_package/action.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,24 @@ inputs:
1818
description: 'Should we upload files to the release?'
1919
required: false
2020
default: 'true'
21+
filenames:
22+
description: The files to sign.
23+
required: true
24+
artifact_directory:
25+
description: The directory in which to output signatures.
26+
required: true
2127

2228
runs:
2329
using: composite
2430
steps:
2531
- uses: actions/download-artifact@v4
2632

33+
- run: npm pack
34+
shell: bash
35+
2736
- name: Make signatures directory
2837
shell: bash
29-
run: mkdir artifacts
38+
run: mkdir ${{ input.artifact_directory }}
3039

3140
- name: Load version and package info
3241
uses: baileympearson/drivers-github-tools/node/get_version_info@add-signing-env-action-for-node
@@ -43,23 +52,13 @@ runs:
4352
- name: Create detached signature
4453
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2
4554
with:
46-
filenames: 'build-*/*.tar.gz'
55+
filenames: ${{ inputs.filenames }}
4756
env:
48-
RELEASE_ASSETS: artifacts/
57+
RELEASE_ASSETS: ${{ input.artifact_directory }}
4958

5059
- name: Copy the tarballs to the artifacts directory
5160
shell: bash
52-
run: for filename in build-*/*.tar.gz; do cp ${filename} artifacts/; done
53-
54-
- run: npm pack
55-
shell: bash
56-
57-
- name: Create detached signature for module
58-
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2
59-
with:
60-
filenames: ${{ env.package_file }}
61-
env:
62-
RELEASE_ASSETS: artifacts/
61+
run: for filename in ${{ inputs.filenames }}; do cp ${filename} artifacts/; done
6362

6463
- name: Display structure of downloaded files
6564
shell: bash

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
host_builds:
1616
strategy:
1717
matrix:
18-
os: [macos-latest, windows-2019]
18+
os: [macos-latest]
19+
# os: [macos-latest, windows-2019]
1920
runs-on: ${{ matrix.os }}
2021
steps:
2122
- uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252
aws_secret_id: ${{ secrets.AWS_SECRET_ID }}
5353
npm_package_name: 'mongodb-client-encryption'
5454
dry_run: ${{ needs.release_please.outputs.release_created == '' }}
55+
filenames: 'build-*/*.tar.gz ${{ env.package_file }}'
56+
artifact_directory: artifacts
5557

5658
- name: Copy sbom file to release assets
5759
shell: bash

0 commit comments

Comments
 (0)