@@ -2,18 +2,21 @@ name: Compress and Sign
2
2
description : ' Compresses package and signs with garasign'
3
3
4
4
inputs :
5
- garasign_username :
6
- description : ' Garasign username input for drivers-github-tools/garasign/ gpg-sign'
5
+ aws_role_arn :
6
+ description : ' AWS role input for drivers-github-tools/gpg-sign@v2 '
7
7
required : true
8
- garasign_password :
9
- description : ' Garasign password input for drivers-github-tools/garasign/ gpg-sign'
8
+ aws_region_name :
9
+ description : ' AWS region name input for drivers-github-tools/gpg-sign@v2 '
10
10
required : true
11
- artifactory_username :
12
- description : ' Artifactory username input for drivers-github-tools/garasign/ gpg-sign'
11
+ aws_secret_id :
12
+ description : ' AWS secret id input for drivers-github-tools/gpg-sign@v2 '
13
13
required : true
14
- artifactory_password :
15
- description : ' Artifactory password input for drivers-github-tools/garasign/gpg-sign '
14
+ npm_package_name :
15
+ description : ' The name for the npm package this repository represents '
16
16
required : true
17
+ sign_SBOMs :
18
+ description : ' If provided, this script will create SBOM signatures'
19
+ required : false
17
20
18
21
runs :
19
22
using : composite
@@ -27,18 +30,28 @@ runs:
27
30
run : |
28
31
package_version=$(jq --raw-output '.version' package.json)
29
32
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
30
- echo "package_file=bson-${package_version}.tgz" >> "$GITHUB_OUTPUT"
33
+ echo "package_file=${{ inputs.npm_package_name }}-${package_version}.tgz" >> "$GITHUB_OUTPUT"
34
+
35
+ - name : Set up drivers-github-tools
36
+ uses : mongodb-labs/drivers-github-tools/setup@v2
37
+ with :
38
+ aws_region_name : ${{ inputs.aws_region_name }}
39
+ aws_role_arn : ${{ inputs.aws_role_arn }}
40
+ aws_secret_id : ${{ inputs.aws_secret_id }}
41
+
31
42
- name : Create detached signature
32
- uses : mongodb-labs/drivers-github-tools/garasign/ gpg-sign@v1
33
- with :
43
+ uses : mongodb-labs/drivers-github-tools/gpg-sign@v2
44
+ with :
34
45
filenames : ${{ steps.get_vars.outputs.package_file }}
35
- garasign_username : ${{ inputs.garasign_username }}
36
- garasign_password : ${{ inputs.garasign_password }}
37
- artifactory_username : ${{ inputs.artifactory_username }}
38
- artifactory_password : ${{ inputs.artifactory_password }}
46
+ env :
47
+ RELEASE_ASSETS : ${{ steps.get_vars.outputs.package_file }}.temp.sig
48
+
49
+ - name : Name release asset correctly
50
+ run : mv ${{ steps.get_vars.outputs.package_file }}.temp.sig ${{ steps.get_vars.outputs.package_file }}.sig
51
+ shell : bash
39
52
40
53
- name : " Upload release artifacts"
41
54
run : gh release upload v${{ steps.get_vars.outputs.package_version }} ${{ steps.get_vars.outputs.package_file }}.sig
42
55
shell : bash
43
56
env :
44
- GH_TOKEN : ${{ github.token }}
57
+ GH_TOKEN : ${{ github.token }}
0 commit comments