@@ -17,13 +17,41 @@ jobs:
17
17
- id : release
18
18
uses : google-github-actions/release-please-action@v4
19
19
20
+
20
21
# If release-please created a release, publish to npm
21
- - if : ${{ steps.release.outputs.release_created }}
22
+ - if : steps.release.outputs.release_created
22
23
uses : actions/checkout@v4
23
- - if : ${{ steps.release.outputs.release_created }}
24
+ - if : steps.release.outputs.release_created
24
25
name : actions/setup
25
26
uses : ./.github/actions/setup
26
- - if : ${{ steps.release.outputs.release_created }}
27
+ - if : steps.release.outputs.release_created
28
+ run : npm pack
29
+ shell : bash
30
+ - if : steps.release.outputs.release_created
31
+ name : Get release version and release package file name
32
+ run : |
33
+ PACKAGE_VERSION=$(jq '.version' package.json | tr -d '"')
34
+ echo "PACKAGE_VERSION=${PACKAGE_VERSION}" >> "$GITHUB_ENV"
35
+ echo "PACKAGE_FILE=bson-${PACKAGE_VERSION}.tgz" >> "$GITHUB_ENV"
36
+ - if : steps.release.outputs.release_created
37
+ name : Create detached signature
38
+ uses : mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
39
+ with :
40
+ filenames : ${{ env.PACKAGE_FILE }}
41
+ garasign_username : ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
42
+ garasign_password : ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
43
+ artifactory_username : ${{ secrets.ARTIFACTORY_USER }}
44
+ artifactory_password : ${{ secrets.ARTIFACTORY_PASSWORD }}
45
+ - if : steps.release.outputs.release_created
46
+ name : " Upload artifacts"
47
+ uses : actions/upload-artifact@v4
48
+ with :
49
+ name : ${{ env.PACKAGE_FILE }}
50
+ path : |
51
+ ${{ env.PACKAGE_FILE }}
52
+ ${{ env.PACKAGE_FILE }}.sig
53
+ retention-days : 3
54
+ - if : steps.release.outputs.release_created
27
55
run : npm publish --provenance
28
56
env :
29
57
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments