File tree 4 files changed +98
-19
lines changed
actions/compress_sign_and_upload 4 files changed +98
-19
lines changed Original file line number Diff line number Diff line change
1
+ name : Compress and Sign
2
+ description : ' Compresses package and signs with garasign'
3
+
4
+ inputs :
5
+ garasign_username :
6
+ description : ' Garasign username input for drivers-github-tools/garasign/gpg-sign'
7
+ required : true
8
+ garasign_password :
9
+ description : ' Garasign password input for drivers-github-tools/garasign/gpg-sign'
10
+ required : true
11
+ artifactory_username :
12
+ description : ' Artifactory username input for drivers-github-tools/garasign/gpg-sign'
13
+ required : true
14
+ artifactory_password :
15
+ description : ' Artifactory password input for drivers-github-tools/garasign/gpg-sign'
16
+ required : true
17
+
18
+ runs :
19
+ using : composite
20
+ steps :
21
+ - run : npm pack
22
+ shell : bash
23
+
24
+ - name : Get release version and release package file name
25
+ id : vars
26
+ shell : bash
27
+ run : |
28
+ package_version=$(jq --raw-output '.version' package.json)
29
+ echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
30
+ echo "package_file=mongodb-${package_version}.tgz" >> "$GITHUB_OUTPUT"
31
+ - name : Create detached signature
32
+ uses : mongodb-labs/drivers-github-tools/garasign/gpg-sign@v1
33
+ with :
34
+ filenames : ${{ steps.vars.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 }}
39
+
40
+ - name : " Upload release artifacts"
41
+ run : gh release upload v${{ steps.vars.package_version }} ${{ steps.vars.package_file }}.sig
42
+ shell : bash
Original file line number Diff line number Diff line change @@ -11,21 +11,30 @@ permissions:
11
11
name : release-5x
12
12
13
13
jobs :
14
- release-please :
14
+ release_please :
15
15
runs-on : ubuntu-latest
16
+ outputs :
17
+ release_created : ${{ steps.release.outputs.release_created }}
16
18
steps :
17
19
- id : release
18
20
uses : google-github-actions/release-please-action@v4
19
21
with :
20
22
target-branch : 5.x
21
-
22
- # If release-please created a release, publish to npm
23
- - if : ${{ steps.release.outputs.release_created }}
24
- uses : actions/checkout@v4
25
- - if : ${{ steps.release.outputs.release_created }}
26
- name : actions/setup
23
+
24
+ compress-sign-and-upload :
25
+ needs : [release_please]
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ - name : actions/setup
27
30
uses : ./.github/actions/setup
28
- - if : ${{ steps.release.outputs.release_created }}
29
- run : npm publish --provenance --tag=5x
31
+ - name : actions/compress_sign_and_upload
32
+ uses : ./.github/actions/compress_sign_and_upload
33
+ with :
34
+ garasign_username : ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
35
+ garasign_password : ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
36
+ artifactory_username : ${{ secrets.ARTIFACTORY_USER }}
37
+ artifactory_password : ${{ secrets.ARTIFACTORY_PASSWORD }}
38
+ - run : npm publish --provenance --tag=5x
30
39
env :
31
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
40
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -11,19 +11,28 @@ permissions:
11
11
name : release
12
12
13
13
jobs :
14
- release-please :
14
+ release_please :
15
15
runs-on : ubuntu-latest
16
+ outputs :
17
+ release_created : ${{ steps.release.outputs.release_created }}
16
18
steps :
17
19
- id : release
18
- uses : googleapis /release-please-action@v4
20
+ uses : google-github-actions /release-please-action@v4
19
21
20
- # If release-please created a release, publish to npm
21
- - if : ${{ steps.release.outputs.release_created }}
22
- uses : actions/checkout@v4
23
- - if : ${{ steps.release.outputs.release_created }}
24
- name : actions/setup
22
+ compress_sign_and_upload :
23
+ needs : [release_please]
24
+ runs-on : ubuntu-latest
25
+ steps :
26
+ - uses : actions/checkout@v4
27
+ - name : actions/setup
25
28
uses : ./.github/actions/setup
26
- - if : ${{ steps.release.outputs.release_created }}
27
- run : npm publish --provenance
29
+ - name : actions/compress_sign_and_upload
30
+ uses : ./.github/actions/compress_sign_and_upload
31
+ with :
32
+ garasign_username : ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
33
+ garasign_password : ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
34
+ artifactory_username : ${{ secrets.ARTIFACTORY_USER }}
35
+ artifactory_password : ${{ secrets.ARTIFACTORY_PASSWORD }}
36
+ - run : npm publish --provenance
28
37
env :
29
38
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -20,6 +20,25 @@ The official [MongoDB](https://www.mongodb.com/) driver for Node.js.
20
20
| Contributing | [ CONTRIBUTING.md] ( https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTING.md ) |
21
21
| Changelog | [ HISTORY.md] ( https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md ) |
22
22
23
+
24
+
25
+ ### Release Integrity
26
+
27
+ The GitHub release contains a detached signature file for the NPM package (named
28
+ ` bson-X.Y.Z.tgz.sig ` ).
29
+
30
+ The following command returns the link npm package.
31
+ ``` shell
32
+ npm view
[email protected] dist.tarball
33
+ ```
34
+
35
+ Using the result of the above command, a ` curl ` command can return the official npm package for the release.
36
+
37
+ To verify the integrity of the downloaded package, run the following command:
38
+ ``` shell
39
+ gpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz
40
+ ```
41
+
23
42
### Bugs / Feature Requests
24
43
25
44
Think you’ve found a bug? Want to see a new feature in ` node-mongodb-native ` ? Please open a
You can’t perform that action at this time.
0 commit comments