Skip to content

Commit dda4ec0

Browse files
nbbeekendurran
andauthored
chore(NODE-5382): add 4.x release workflow (#3748)
Co-authored-by: Durran Jordan <durran@gmail.com>
1 parent b97132e commit dda4ec0

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release-4.x.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
on:
2+
push:
3+
branches: [4.x]
4+
workflow_dispatch: {}
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: release
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- id: release
17+
uses: google-github-actions/release-please-action@v3
18+
with:
19+
release-type: node
20+
package-name: mongodb
21+
# Example: chore(main): release 5.7.0 [skip-ci]
22+
# ${scope} - parenthesis included, base branch name
23+
pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
24+
pull-request-header: 'Please run the release_notes action before releasing to generate release highlights'
25+
changelog-path: HISTORY.md
26+
default-branch: 4.x
27+
28+
# If release-please created a release, publish to npm
29+
- if: ${{ steps.release.outputs.release_created }}
30+
uses: actions/checkout@v3
31+
- if: ${{ steps.release.outputs.release_created }}
32+
name: actions/setup
33+
uses: ./.github/actions/setup
34+
- if: ${{ steps.release.outputs.release_created }}
35+
run: npm publish --provenance --tag=4x
36+
env:
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)