Skip to content

release

release #39

Workflow file for this run

on:
push:
branches: [main]
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
id-token: write
name: release
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: google-github-actions/release-please-action@v4
- if: true
run: echo ${{ steps.release.outputs }}
- if: true
run: echo ${{ steps.release.outputs.version }}
# If release-please created a release, publish to npm
- if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- if: ${{ steps.release.outputs.release_created }}
name: actions/setup
uses: ./.github/actions/setup
- if: ${{ steps.release.outputs.release_created }}
run: npm pack
shell: bash
- if: ${{ steps.release.outputs.release_created }}
run: |
echo "PACKAGE_VERSION=${env.PACKAGE_VERSION}" >> "$GITHUB_ENV"
echo "PACKAGE_FILE=mongodb-${steps.release.outputs.}.tgz" >> "$GITHUB_ENV"
- if: ${{ steps.release.outputs.release_created }}
name: Create detached signature
uses: mongodb-labs/drivers-github-tools/garasign/gpg-sign@main
with:
filenames: ${{ env.PACKAGE_FILE }}
garasign_username: ${{ secrets.GRS_CONFIG_USER1_USERNAME }}
garasign_password: ${{ secrets.GRS_CONFIG_USER1_PASSWORD }}
artifactory_username: ${{ secrets.ARTIFACTORY_USER }}
artifactory_password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- if: ${{ steps.release.outputs.release_created }}
name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_FILE }}
path: |
${{ env.PACKAGE_FILE }}
${{ env.PACKAGE_FILE }}.sig
retention-days: 3
- if: false
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}