Skip to content

Commit df748cf

Browse files
temp for reset
1 parent 61c8949 commit df748cf

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

.github/workflows/release.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,41 @@ jobs:
1717
- id: release
1818
uses: google-github-actions/release-please-action@v4
1919

20+
2021
# If release-please created a release, publish to npm
21-
- if: ${{ steps.release.outputs.release_created }}
22+
- if: steps.release.outputs.release_created
2223
uses: actions/checkout@v4
23-
- if: ${{ steps.release.outputs.release_created }}
24+
- if: steps.release.outputs.release_created
2425
name: actions/setup
2526
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
2755
run: npm publish --provenance
2856
env:
2957
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)