-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(NODE-4869): sign and upload to releases
- Loading branch information
Showing
3 changed files
with
75 additions
and
0 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,15 @@ | ||
name: Setup | ||
description: 'Installs node, driver dependencies, and builds source' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm install -g npm@latest | ||
shell: bash | ||
- run: npm clean-install | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Sign and Upload Package | ||
description: 'Signs and uploads the release artifacts' | ||
|
||
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 | ||
- uses: actions/download-artifact@v4 | ||
- name: Display structure of downloaded files | ||
shell: bash | ||
run: ls -R | ||
- 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