Skip to content

Commit 1329c75

Browse files
temp for testing
1 parent 9307a80 commit 1329c75

File tree

4 files changed

+106
-9
lines changed

4 files changed

+106
-9
lines changed

.github/workflows/release-4.x.yml

+30-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,39 @@ jobs:
2727
default-branch: 4.x
2828

2929
# If release-please created a release, publish to npm
30-
- if: ${{ steps.release.outputs.release_created }}
30+
- if: ${{ true }}
3131
uses: actions/checkout@v3
32-
- if: ${{ steps.release.outputs.release_created }}
32+
- if: ${{ true }}
3333
name: actions/setup
3434
uses: ./.github/actions/setup
35-
- if: ${{ steps.release.outputs.release_created }}
35+
- if: true
36+
run: npm pack
37+
shell: bash
38+
- if: true
39+
name: Get release version and release package file name
40+
run: |
41+
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
42+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
43+
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
44+
- if: true
45+
name: Create detached signature
46+
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
47+
with:
48+
filenames: ${{ env.PACKAGE_FILE }}
49+
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
50+
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
51+
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
52+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
53+
- if: true
54+
name: "Upload artifacts"
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ${{ env.PACKAGE_FILE }}
58+
path: |
59+
${{ env.PACKAGE_FILE }}
60+
${{ env.PACKAGE_FILE }}.sig
61+
retention-days: 3
62+
- if: false
3663
run: npm publish --provenance --tag=4x
3764
env:
3865
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release-5.x.yml

+30-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,39 @@ jobs:
2727
default-branch: 5.x
2828

2929
# If release-please created a release, publish to npm
30-
- if: ${{ steps.release.outputs.release_created }}
30+
- if: ${{ true }}
3131
uses: actions/checkout@v3
32-
- if: ${{ steps.release.outputs.release_created }}
32+
- if: ${{ true }}
3333
name: actions/setup
3434
uses: ./.github/actions/setup
35-
- if: ${{ steps.release.outputs.release_created }}
35+
- if: true
36+
run: npm pack
37+
shell: bash
38+
- if: true
39+
name: Get release version and release package file name
40+
run: |
41+
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
42+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
43+
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
44+
- if: true
45+
name: Create detached signature
46+
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
47+
with:
48+
filenames: ${{ env.PACKAGE_FILE }}
49+
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
50+
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
51+
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
52+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
53+
- if: true
54+
name: "Upload artifacts"
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ${{ env.PACKAGE_FILE }}
58+
path: |
59+
${{ env.PACKAGE_FILE }}
60+
${{ env.PACKAGE_FILE }}.sig
61+
retention-days: 3
62+
- if: false
3663
run: npm publish --provenance --tag=5x
3764
env:
3865
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

+33-3
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,42 @@ jobs:
2727
default-branch: main
2828

2929
# If release-please created a release, publish to npm
30-
- if: ${{ steps.release.outputs.release_created }}
30+
- if: ${{ true }}
3131
uses: actions/checkout@v3
32-
- if: ${{ steps.release.outputs.release_created }}
32+
- if: ${{ true }}
3333
name: actions/setup
3434
uses: ./.github/actions/setup
35-
- if: ${{ steps.release.outputs.release_created }}
35+
- if: true
36+
run: npm pack
37+
shell: bash
38+
- if: true
39+
name: Get release version and release package file name
40+
run: |
41+
PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
42+
echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
43+
echo "PACKAGE_FILE=mongodb-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
44+
- if: true
45+
name: Create detached signature
46+
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
47+
with:
48+
filenames: ${{ env.PACKAGE_FILE }}
49+
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
50+
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
51+
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
52+
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
53+
- if: true
54+
name: "Upload artifacts"
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: ${{ env.PACKAGE_FILE }}
58+
path: |
59+
${{ env.PACKAGE_FILE }}
60+
${{ env.PACKAGE_FILE }}.sig
61+
retention-days: 3
62+
- if: false
3663
run: npm publish --provenance
3764
env:
3865
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
66+
67+
68+

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,19 @@ The official [MongoDB](https://www.mongodb.com/) driver for Node.js.
2020
| Contributing | [CONTRIBUTING.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/CONTRIBUTING.md) |
2121
| Changelog | [HISTORY.md](https://github.com/mongodb/node-mongodb-native/blob/HEAD/HISTORY.md) |
2222

23+
24+
### Release Integrity
25+
26+
The GitHub release contains a detached signature file for the NPM package (named
27+
`mongodb-X.Y.Z.tgz.sig`).
28+
29+
To verify the integrity of the downloaded package, run the following command:
30+
31+
```shell
32+
gpg --verify mongodb-X.Y.Z.tgz.sig mongodb-X.Y.Z.tgz
33+
```
34+
35+
2336
### Bugs / Feature Requests
2437

2538
Think you’ve found a bug? Want to see a new feature in `node-mongodb-native`? Please open a

0 commit comments

Comments
 (0)