-
Notifications
You must be signed in to change notification settings - Fork 252
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
61c8949
commit f0fbe91
Showing
4 changed files
with
97 additions
and
17 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,43 @@ | ||
name: Compress and Sign | ||
description: 'Compresses package and signs with garasign' | ||
|
||
inputs: | ||
garasign_username: | ||
description: 'Garasign username input for drivers-github-tools/garasign/gpg-sign' | ||
required: true | ||
garasign_password: | ||
description: 'Garasign password input for drivers-github-tools/garasign/gpg-sign' | ||
required: true | ||
artifactory_username: | ||
description: 'Artifactory username input for drivers-github-tools/garasign/gpg-sign' | ||
required: true | ||
artifactory_password: | ||
description: 'Artifactory password input for drivers-github-tools/garasign/gpg-sign' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- run: npm pack | ||
shell: bash | ||
|
||
- name: Get release version and release package file name | ||
id: vars | ||
shell: bash | ||
run: | | ||
package_version=$(jq --raw-output '.version' package.json) | ||
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT" | ||
echo "package_file=bson-${package_version}.tgz" >> "$GITHUB_OUTPUT" | ||
- name: Create detached signature | ||
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@v1 | ||
with: | ||
filenames: ${{ steps.vars.package_file }} | ||
garasign_username: ${{ inputs.garasign_username }} | ||
garasign_password: ${{ inputs.garasign_password }} | ||
artifactory_username: ${{ inputs.artifactory_username }} | ||
artifactory_password: ${{ inputs.artifactory_password }} | ||
|
||
- name: "Upload release artifacts" | ||
run: gh release upload v${{ steps.vars.package_version }} ${{ steps.vars.package_file }}.sig | ||
shell: bash |
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 |
---|---|---|
|
@@ -11,6 +11,25 @@ You can learn more about it in [the specification](http://bsonspec.org). | |
- [Documentation](#documentation) | ||
- [FAQ](#faq) | ||
|
||
|
||
### Release Integrity | ||
|
||
The GitHub release contains a detached signature file for the NPM package (named | ||
`bson-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 bson-X.Y.Z.tgz.sig bson-X.Y.Z.tgz | ||
``` | ||
|
||
|
||
## Bugs / Feature Requests | ||
|
||
Think you've found a bug? Want to see a new feature in `bson`? Please open a case in our issue management tool, JIRA: | ||
|