Skip to content

Commit

Permalink
temp for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed May 22, 2024
1 parent 9307a80 commit 1329c75
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 9 deletions.
33 changes: 30 additions & 3 deletions .github/workflows/release-4.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,39 @@ jobs:
default-branch: 4.x

# If release-please created a release, publish to npm
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
uses: actions/checkout@v3
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
name: actions/setup
uses: ./.github/actions/setup
- if: ${{ steps.release.outputs.release_created }}
- if: true
run: npm pack
shell: bash
- if: true
name: Get release version and release package file name
run: |
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
- if: true
name: Create detached signature
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
with:
filenames: ${{ env.PACKAGE_FILE }}
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- if: true
name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_FILE }}
path: |
${{ env.PACKAGE_FILE }}
${{ env.PACKAGE_FILE }}.sig
retention-days: 3
- if: false
run: npm publish --provenance --tag=4x
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
33 changes: 30 additions & 3 deletions .github/workflows/release-5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,39 @@ jobs:
default-branch: 5.x

# If release-please created a release, publish to npm
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
uses: actions/checkout@v3
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
name: actions/setup
uses: ./.github/actions/setup
- if: ${{ steps.release.outputs.release_created }}
- if: true
run: npm pack
shell: bash
- if: true
name: Get release version and release package file name
run: |
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
- if: true
name: Create detached signature
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
with:
filenames: ${{ env.PACKAGE_FILE }}
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- if: true
name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_FILE }}
path: |
${{ env.PACKAGE_FILE }}
${{ env.PACKAGE_FILE }}.sig
retention-days: 3
- if: false
run: npm publish --provenance --tag=5x
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 33 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,42 @@ jobs:
default-branch: main

# If release-please created a release, publish to npm
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
uses: actions/checkout@v3
- if: ${{ steps.release.outputs.release_created }}
- if: ${{ true }}
name: actions/setup
uses: ./.github/actions/setup
- if: ${{ steps.release.outputs.release_created }}
- if: true
run: npm pack
shell: bash
- if: true
name: Get release version and release package file name
run: |
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
- if: true
name: Create detached signature
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
with:
filenames: ${{ env.PACKAGE_FILE }}
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- if: true
name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_FILE }}
path: |
${{ env.PACKAGE_FILE }}
${{ env.PACKAGE_FILE }}.sig
retention-days: 3
- if: false
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}



13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ 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`).

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
Expand Down

0 comments on commit 1329c75

Please sign in to comment.