Skip to content

Commit 15ef5f4

Browse files
nbbeekendurran
andauthored
chore(NODE-5428): add 5.x release automation (#3807)
Co-authored-by: Durran Jordan <durran@gmail.com>
1 parent 6b7e186 commit 15ef5f4

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

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

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

0 commit comments

Comments
 (0)