@@ -2,18 +2,21 @@ name: Compress and Sign
22description : ' Compresses package and signs with garasign'
33
44inputs :
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 '
77 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 '
1010 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 '
1313 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 '
1616 required : true
17+ sign_SBOMs :
18+ description : ' If provided, this script will create SBOM signatures'
19+ required : false
1720
1821runs :
1922 using : composite
@@ -27,18 +30,28 @@ runs:
2730 run : |
2831 package_version=$(jq --raw-output '.version' package.json)
2932 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+
3142 - 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 :
3445 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
3952
4053 - name : " Upload release artifacts"
4154 run : gh release upload v${{ steps.get_vars.outputs.package_version }} ${{ steps.get_vars.outputs.package_file }}.sig
4255 shell : bash
4356 env :
44- GH_TOKEN : ${{ github.token }}
57+ GH_TOKEN : ${{ github.token }}
0 commit comments