-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(NODE-6160): sign and upload to releases #9
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 --ignore-scripts | ||
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,71 @@ | ||
name: Sign and Upload Package | ||
description: 'Signs native modules with garasign' | ||
|
||
inputs: | ||
aws_role_arn: | ||
description: 'AWS role input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
aws_region_name: | ||
description: 'AWS region name input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
aws_secret_id: | ||
description: 'AWS secret id input for drivers-github-tools/gpg-sign@v2' | ||
required: true | ||
npm_package_name: | ||
description: 'The name for the npm package this repository represents' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
|
||
- name: Make signatures directory | ||
shell: bash | ||
run: mkdir artifacts | ||
|
||
- name: Set up drivers-github-tools | ||
uses: mongodb-labs/drivers-github-tools/setup@v2 | ||
with: | ||
aws_region_name: ${{ inputs.aws_region_name }} | ||
aws_role_arn: ${{ inputs.aws_role_arn }} | ||
aws_secret_id: ${{ inputs.aws_secret_id }} | ||
|
||
- name: Create detached signature | ||
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2 | ||
with: | ||
filenames: 'build-*/*.tar.gz' | ||
env: | ||
RELEASE_ASSETS: artifacts/ | ||
|
||
- name: Copy the tarballs to the artifacts directory | ||
shell: bash | ||
run: for filename in build-*/*.tar.gz; do cp ${filename} artifacts/; done | ||
|
||
- run: npm pack | ||
shell: bash | ||
|
||
- name: Get release version and release package file name | ||
id: get_vars | ||
shell: bash | ||
run: | | ||
package_version=$(jq --raw-output '.version' package.json) | ||
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT" | ||
echo "package_file=${{ inputs.npm_package_name }}-${package_version}.tgz" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Create detached signature for module | ||
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2 | ||
with: | ||
filenames: ${{ steps.get_vars.outputs.package_file }} | ||
env: | ||
RELEASE_ASSETS: artifacts/ | ||
|
||
- name: Display structure of downloaded files | ||
shell: bash | ||
run: ls -la artifacts/ | ||
|
||
- name: "Upload release artifacts" | ||
run: gh release upload v${{ steps.get_vars.outputs.package_version }} artifacts/*.* | ||
shell: bash | ||
env: | ||
GH_TOKEN: ${{ github.token }} |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM, is is possible to point me to an example test release, as an extra check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm going off is seeing release-please creating the PR now: #15 and was verifying the signing actions working but not being able to upload before release-please was put in, example run here: https://github.com/mongodb-js/mongodb-client-encryption/actions/runs/9403489046/job/25900735594
If that's not sufficient let me know and I can create a new fake repo and project and copy everything over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for a fork: Can we have a run where we run
build.yml
to see the structure of the downloaded files, but comment outgh release upload ..
andnpm publish
? To confirm the signatures are there.