-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
f56938f
commit f38c5fe
Showing
4 changed files
with
113 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Compress and Sign | ||
description: 'Compresses package and signs with garasign' | ||
|
||
inputs: | ||
aws_role_arn: | ||
description: 'AWS role input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
aws_region_name: | ||
description: 'AWS region name input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
aws_secret_id: | ||
description: 'AWS secret id input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
npm_package_name: | ||
description: 'The name for the npm package this repository represents' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: npm pack | ||
shell: bash | ||
|
||
- name: Get release version and release package file name | ||
id: get_vars | ||
shell: bash | ||
run: | | ||
package_version=$(jq --raw-output '.version' package.json) | ||
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT" | ||
echo "package_file=${{ inputs.npm_package_name }}-${package_version}.tgz" >> "$GITHUB_OUTPUT" | ||
- name: Set up drivers-github-tools | ||
uses: mongodb-labs/drivers-github-tools/setup@v2 | ||
with: | ||
aws_region_name: ${{ inputs.aws_region_name }} | ||
aws_role_arn: ${{ inputs.aws_role_arn }} | ||
aws_secret_id: ${{ inputs.aws_secret_id }} | ||
|
||
- name: Create detached signature | ||
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2 | ||
with: | ||
filenames: ${{ steps.get_vars.outputs.package_file }} | ||
env: | ||
RELEASE_ASSETS: ${{ steps.get_vars.outputs.package_file }}.temp.sig | ||
|
||
- name: Name release asset correctly | ||
run: mv ${{ steps.get_vars.outputs.package_file }}.temp.sig ${{ steps.get_vars.outputs.package_file }}.sig | ||
shell: bash | ||
|
||
- name: "Upload release artifacts" | ||
run: gh release upload v${{ steps.get_vars.outputs.package_version }} ${{ steps.get_vars.outputs.package_file }}.sig | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
| Contributing | [CONTRIBUTING.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTING.md) | | ||
| Changelog | [HISTORY.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md) | | ||
|
||
|
||
|
||
### Release Integrity | ||
|
||
The GitHub release contains a detached signature file for the NPM package (named | ||
`mongodb-X.Y.Z.tgz.sig`). | ||
|
||
The following command returns the link npm package. | ||
```shell | ||
npm view [email protected] dist.tarball | ||
``` | ||
|
||
Using the result of the above command, a `curl` command can return the official npm package for the release. | ||
|
||
To verify the integrity of the downloaded package, run the following command: | ||
```shell | ||
gpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz | ||
``` | ||
|
||
### Bugs / Feature Requests | ||
|
||
Think you’ve found a bug? Want to see a new feature in `node-mongodb-native`? Please open a | ||
|