From ec9f04642f535a683f6b55b8bece8e0ea328a787 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Fri, 30 Jun 2023 10:14:47 -0400 Subject: [PATCH] chore(NODE-5382): add 4.x release workflow --- .github/workflows/release-4.x.yml | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release-4.x.yml diff --git a/.github/workflows/release-4.x.yml b/.github/workflows/release-4.x.yml new file mode 100644 index 00000000000..0d7b9f4ddf1 --- /dev/null +++ b/.github/workflows/release-4.x.yml @@ -0,0 +1,37 @@ +on: + push: + branches: [4.x] + workflow_dispatch: {} + +permissions: + contents: write + pull-requests: write + +name: release + +jobs: + release-please: + runs-on: ubuntu-latest + steps: + - id: release + uses: google-github-actions/release-please-action@v3 + with: + release-type: node + package-name: mongodb + # Example: chore(main): release 5.7.0 [skip-ci] + # ${scope} - parenthesis included, base branch name + pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]' + pull-request-header: 'Please run the release_notes action before releasing to generate release highlights' + changelog-path: HISTORY.md + default-branch: 4.x + + # If release-please created a release, publish to npm + - if: ${{ steps.release.outputs.release_created }} + uses: actions/checkout@v3 + - if: ${{ steps.release.outputs.release_created }} + name: actions/setup + uses: ./.github/actions/setup + - if: ${{ steps.release.outputs.release_created }} + run: npm publish --provenance --tag=4x + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}