Skip to content

Commit

Permalink
refactor: release signing upgraded to drivers-github-tools-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
aditi-khare-mongoDB committed May 29, 2024
1 parent f0fbe91 commit c8f5350
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
29 changes: 19 additions & 10 deletions .github/actions/compress_sign_and_upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ runs:
echo "package_version=${package_version}" >> "$GITHUB_OUTPUT"
echo "package_file=bson-${package_version}.tgz" >> "$GITHUB_OUTPUT"
- name: Set up drivers-github-tools
uses: mongodb-labs/drivers-github-tools/setup@v2
with:
aws_role_arn: ${{ inputs.aws_role_arn }}
aws_region_name: ${{ inputs.aws_region_name }}
aws_secret_id: ${{ inputs.aws_secret_id }}
- name: Create detached signature
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@v1
uses: mongodb-labs/drivers-github-tools/gpg-sign@v2
- name: "Temporary: check that signature exists"
uses: actions/upload-artifact@v4
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
name: ${{ steps.vars.outputs.package_version }}
path: |
${{ steps.vars.outputs.package_file }}
${{ steps.vars.outputs.package_filen }}.sig
retention-days: 3
# - name: "Upload release artifacts"
# run: gh release upload v${{ steps.vars.outputs.package_version }} ${{ steps.vars.outputs.package_file }}.sig
# shell: bash
# env:
# GH_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .github/workflows/release-5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- run: npm publish --provenance --tag=5x
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm publish --provenance --tag=5x
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ jobs:
- name: actions/compress_sign_and_upload
uses: ./.github/actions/compress_sign_and_upload
with:
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
aws_role_arn: ${{ env.secrets.AWS_ROLE_ARN }}
aws_region_name: ${{ env.AWS_REGION_NAME }}
aws_secret_id: ${{ env.secrets.APP_SECRET_KEY}}
# - run: npm publish --provenance
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit c8f5350

Please sign in to comment.