Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: mongotools-audit
name: audit

on:
schedule:
Expand Down Expand Up @@ -38,7 +38,7 @@ jobs:
echo "install"
pnpm install
echo "show outdated (if any)"
pnpm outdated --depth=3 || echo "you must think about update your dependencies :)"
pnpm outdated --depth=3 || echo "::notice title=OneLineReport::ℹ️ you must think about update your dependencies :)"

- name: pnpm audit
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# mongotools continuous integration
name: mongotools-ci
name: main

# Controls when the action will run.
on:
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/major.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# mongotools create minor from 'main' branch
name: mongotools-major
# mongotools create major from 'main' branch
name: major
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -12,6 +15,9 @@ jobs:
node-version: [ 18.x ]

steps:
- name: Check GitHub CLI
run: gh --version

- name: Checkout code
uses: actions/checkout@v5

Expand All @@ -35,4 +41,21 @@ jobs:
git checkout main
pnpm version major
git branch -f npmjs
git push origin main npmjs --tags
git push -f origin main npmjs --tags

- name: Create draft release
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
run: |
# Extract version from package.json
VERSION=$(node -p "require('./package.json').version")

echo "🔖 Creating draft release for version v$VERSION"

# Optionally check if release already exists
if gh release view "v$VERSION" > /dev/null 2>&1; then
echo "::warning title=ℹ️ Release v$VERSION already exists, skipping."
else
gh release create "v$VERSION" --draft --generate-notes
echo "::notice title=✅ Draft release v$VERSION created."
fi
25 changes: 24 additions & 1 deletion .github/workflows/minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -12,6 +15,9 @@ jobs:
node-version: [ 18.x ]

steps:
- name: Check GitHub CLI
run: gh --version

- name: Checkout code
uses: actions/checkout@v5

Expand All @@ -35,4 +41,21 @@ jobs:
git checkout main
pnpm version minor
git branch -f npmjs
git push origin main npmjs --tags
git push -f origin main npmjs --tags

- name: Create draft release
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
run: |
# Extract version from package.json
VERSION=$(node -p "require('./package.json').version")

echo "🔖 Creating draft release for version v$VERSION"

# Optionally check if release already exists
if gh release view "v$VERSION" > /dev/null 2>&1; then
echo "::warning title=ℹ️ Release v$VERSION already exists, skipping."
else
gh release create "v$VERSION" --draft --generate-notes
echo "::notice title=✅ Draft release v$VERSION created."
fi
27 changes: 25 additions & 2 deletions .github/workflows/patch.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# mongotools create patch from 'main' branch
name: mongotools-patch
name: patch
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -12,6 +15,9 @@ jobs:
node-version: [ 18.x ]

steps:
- name: Check GitHub CLI
run: gh --version

- name: Checkout code
uses: actions/checkout@v5

Expand All @@ -35,4 +41,21 @@ jobs:
git checkout main
pnpm version patch
git branch -f npmjs
git push origin main npmjs --tags
git push -f origin main npmjs --tags

- name: Create draft release
env:
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_TOKEN }}
run: |
# Extract version from package.json
VERSION=$(node -p "require('./package.json').version")

echo "🔖 Creating draft release for version v$VERSION"

# Optionally check if release already exists
if gh release view "v$VERSION" > /dev/null 2>&1; then
echo "::warning title=ℹ️ Release v$VERSION already exists, skipping."
else
gh release create "v$VERSION" --draft --generate-notes
echo "::notice title=✅ Draft release v$VERSION created."
fi