Skip to content

Commit 40d6e71

Browse files
committed
WIP: individual publishing of packages
1 parent 90581ae commit 40d6e71

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.github/workflows/bump-packages.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Bump packages
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
update_generated_files:
10+
name: Bump packages
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Create Github App Token
14+
uses: mongodb-js/devtools-shared/actions/setup-bot-token@main
15+
id: app-token
16+
with:
17+
app-id: ${{ vars.DEVTOOLS_BOT_APP_ID }}
18+
private-key: ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
19+
20+
- uses: actions/checkout@v4
21+
with:
22+
# don't checkout a detatched HEAD
23+
ref: ${{ github.head_ref }}
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 20.16.0
28+
cache: "npm"
29+
30+
- name: Install [email protected]
31+
run: |
32+
npm install -g [email protected]
33+
34+
- name: Install Dependencies
35+
run: |
36+
npm -v
37+
npm ci
38+
39+
- name: Bump packages
40+
env:
41+
LAST_BUMP_COMMIT_MESSAGE: "chore(release): bump package versions"
42+
SKIP_BUMP_PACKAGES: "mongodb-compass"
43+
run: |
44+
npm run bump-packages
45+
git add .
46+
git commit --no-allow-empty -m "$LAST_BUMP_COMMIT_MESSAGE" || true
47+
48+
- name: Create Pull Request
49+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # 7.0.5
50+
with:
51+
token: ${{ steps.app-token.outputs.token }}
52+
commit-message: "chore(release): bump package versions"
53+
branch: ci/bump-packages
54+
title: "chore(release): bump package versions"
55+
labels: no-title-validation
56+
body: |
57+
- Bump package versions

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"reformat": "npm run reformat --workspaces --if-present",
7171
"prepare": "husky",
7272
"precommit": "precommit",
73-
"preinstall": "node scripts/sort-workspaces.js"
73+
"preinstall": "node scripts/sort-workspaces.js",
74+
"bump-packages": "bump-monorepo-packages"
7475
},
7576
"config": {
7677
"unsafe-perm": true

0 commit comments

Comments
 (0)