Skip to content

Commit d3bca79

Browse files
committed
ci(release): migrating from standard-version to release-please
standard-version is deprecated. Release Please is the recommended tool as a replacement. closes #113
1 parent e244658 commit d3bca79

File tree

7 files changed

+119
-87
lines changed

7 files changed

+119
-87
lines changed

.github/release-please-config.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"packages": {
3+
".": {
4+
"release-type": "node",
5+
"package-name": "@tiberriver256/mcp-server-azure-devops",
6+
"changelog-path": "CHANGELOG.md",
7+
"bump-minor-pre-major": true,
8+
"bump-patch-for-minor-pre-major": true,
9+
"draft": false,
10+
"prerelease": false
11+
}
12+
},
13+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
14+
}

.github/release-please-manifest.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.11"
3+
}

.github/workflows/release-please.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v4
17+
id: release
18+
with:
19+
token: ${{ secrets.RELEASE_PAT }}
20+
config-file: .github/release-please-config.json
21+
manifest-file: .github/release-please-manifest.json
22+
23+
# The following steps only run if a new release is created
24+
- name: Checkout code
25+
if: ${{ steps.release.outputs.release_created }}
26+
uses: actions/checkout@v3
27+
with:
28+
ref: ${{ steps.release.outputs.tag_name }}
29+
30+
- name: Setup Node.js
31+
if: ${{ steps.release.outputs.release_created }}
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: 'lts/*'
35+
registry-url: 'https://registry.npmjs.org/'
36+
37+
- name: Install Dependencies
38+
if: ${{ steps.release.outputs.release_created }}
39+
run: npm ci
40+
41+
- name: Build package
42+
if: ${{ steps.release.outputs.release_created }}
43+
run: npm run build
44+
45+
- name: Publish to npm
46+
if: ${{ steps.release.outputs.release_created }}
47+
run: npm publish --access public
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

-68
This file was deleted.

CONTRIBUTING.md

+21-12
Original file line numberDiff line numberDiff line change
@@ -131,18 +131,27 @@ npm run commit
131131

132132
## Automated Release Workflow
133133

134-
Our project uses an automated release workflow that leverages Conventional Commits to manage semantic versioning, generate changelogs, and create GitHub Releases.
135-
136-
The workflow is currently triggered manually via GitHub Actions' `workflow_dispatch` feature. In the future, it may be configured to run automatically on merges to the `main` branch.
137-
138-
When the workflow runs, it:
139-
140-
1. Analyzes the commit messages since the last release
141-
2. Determines the appropriate semantic version bump
142-
3. Updates the version in package.json
143-
4. Generates or updates the CHANGELOG.md file
144-
5. Creates a new Git tag
145-
6. Creates a GitHub Release with release notes
134+
Our project uses [Release Please](https://github.com/googleapis/release-please) to automate releases based on Conventional Commits. This approach manages semantic versioning, changelog generation, and GitHub Releases creation.
135+
136+
The workflow is automatically triggered on pushes to the `main` branch and follows this process:
137+
138+
1. Release Please analyzes commit messages since the last release
139+
2. If releasable changes are detected, it creates or updates a Release PR
140+
3. When the Release PR is merged, it:
141+
- Updates the version in package.json
142+
- Updates CHANGELOG.md with details of all changes
143+
- Creates a Git tag and GitHub Release
144+
- Publishes the package to npm
145+
146+
### Release PR Process
147+
148+
1. When commits with conventional commit messages are pushed to `main`, Release Please automatically creates a Release PR
149+
2. The Release PR contains all the changes since the last release with proper version bump based on commit types:
150+
- `feat:` commits trigger a minor version bump
151+
- `fix:` commits trigger a patch version bump
152+
- `feat!:` or `fix!:` commits with breaking changes trigger a major version bump
153+
3. Review the Release PR to ensure the changelog and version bump are correct
154+
4. Merge the Release PR to trigger the actual release
146155

147156
This automation ensures consistent and well-documented releases that accurately reflect the changes made since the previous release.
148157

package.json

+12-7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
"path": "./node_modules/cz-conventional-changelog"
1919
}
2020
},
21+
"release-please": {
22+
"release-type": "node",
23+
"changelog-types": [
24+
{"type": "feat", "section": "Features", "hidden": false},
25+
{"type": "fix", "section": "Bug Fixes", "hidden": false},
26+
{"type": "chore", "section": "Miscellaneous", "hidden": false},
27+
{"type": "docs", "section": "Documentation", "hidden": false},
28+
{"type": "perf", "section": "Performance Improvements", "hidden": false},
29+
{"type": "refactor", "section": "Code Refactoring", "hidden": false}
30+
]
31+
},
2132
"scripts": {
2233
"build": "tsc && chmod +x dist/index.js",
2334
"dev": "ts-node-dev --respawn --transpile-only src/index.ts",
@@ -31,12 +42,7 @@
3142
"lint": "eslint . --ext .ts",
3243
"format": "prettier --write \"src/**/*.ts\" \"tests/**/*.ts\"",
3344
"prepare": "husky install",
34-
"commit": "cz",
35-
"release": "standard-version",
36-
"release:minor": "standard-version --release-as minor",
37-
"release:patch": "standard-version --release-as patch",
38-
"release:major": "standard-version --release-as major",
39-
"release:dryrun": "standard-version --dry-run"
45+
"commit": "cz"
4046
},
4147
"keywords": [
4248
"azure-devops",
@@ -69,7 +75,6 @@
6975
"husky": "^8.0.3",
7076
"jest": "^29.0.0",
7177
"prettier": "^3.0.0",
72-
"standard-version": "^9.5.0",
7378
"ts-jest": "^29.0.0",
7479
"ts-node-dev": "^2.0.0",
7580
"typescript": "^5.8.2"

project-management/task-management/done.md

+20
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
## Completed Tasks
22

3+
- [x] **Task**: Migrate release automation to use Release Please for version management (GitHub Issue #113)
4+
- **Role**: DevOps Engineer
5+
- **Phase**: Completed
6+
- **Notes**:
7+
- Implemented a new Release Please GitHub Action workflow
8+
- Created Release Please configuration and manifest files
9+
- Updated package.json to remove standard-version scripts and add Release Please config
10+
- Deprecated the existing manual release workflow
11+
- Added comprehensive documentation for the migration
12+
- Updated CONTRIBUTING.md to reflect the new release process
13+
- **Sub-tasks**:
14+
- [x] Created .github/workflows/release-please.yml
15+
- [x] Created .github/release-please-config.json
16+
- [x] Created .github/release-please-manifest.json
17+
- [x] Updated package.json to remove standard-version
18+
- [x] Marked existing release.yml as deprecated
19+
- [x] Updated CONTRIBUTING.md with new process
20+
- [x] Created migration guide in docs/release-please-migration.md
21+
- **Completed**: April 2, 2025
22+
323
- [x] **Task**: Implement get_project_details core functionality (GitHub Issue #101)
424
- **Role**: Full-Stack Developer
525
- **Phase**: Completed

0 commit comments

Comments
 (0)