Skip to content

Commit 3974f86

Browse files
authored
Merge pull request #39 from currents-dev/chore/add-release
chore: add release workflow and changelog management
2 parents bd5ad1c + 21e3c15 commit 3974f86

34 files changed

+938
-31441
lines changed

.github/workflows/README.md

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,41 @@ This directory contains automated CI/CD workflows for the Currents MCP Server pr
44

55
## Available Workflows
66

7+
### `release.yaml` - Create Release
8+
9+
Creates a new release with changelog, git tag, and GitHub release.
10+
11+
**Triggers:**
12+
13+
- Manual dispatch only (workflow_dispatch)
14+
15+
**Inputs:**
16+
17+
- `dry_run` (boolean, default: false): Preview the release without making changes
18+
19+
**What it does:**
20+
21+
1. Checks out the code with full git history
22+
2. Sets up Node.js 24.x
23+
3. Installs dependencies
24+
4. Runs the test suite
25+
5. Analyzes commits since last tag to determine version bump:
26+
- `feat:` commits → minor version bump (e.g., 2.1.3 → 2.2.0)
27+
- `fix:` commits → patch version bump (e.g., 2.1.3 → 2.1.4)
28+
- `BREAKING CHANGE:` → major version bump (e.g., 2.1.3 → 3.0.0)
29+
6. Updates CHANGELOG.md with new entries
30+
7. Creates a git commit and tag
31+
8. Creates a GitHub release with auto-generated notes
32+
33+
**Usage:**
34+
35+
1. Go to Actions → "Create Release"
36+
2. Click "Run workflow"
37+
3. Optionally enable "Dry run" to preview changes
38+
4. After release completes, trigger "Publish NPM Package" workflow to publish to npm
39+
40+
---
41+
742
### `test.yml` - Unit Tests
843

944
Runs the unit test suite on every push and pull request.
@@ -22,12 +57,6 @@ Runs the unit test suite on every push and pull request.
2257
5. Generates code coverage reports
2358
6. Optionally uploads coverage to Codecov (requires `CODECOV_TOKEN` secret)
2459

25-
**Matrix Strategy:**
26-
The workflow runs tests on multiple Node.js versions to ensure compatibility:
27-
28-
- Node.js 20.x (LTS)
29-
- Node.js 22.x (Latest)
30-
3160
**Coverage Reports:**
3261
Coverage reports are generated for all Node versions, but only uploaded from Node 20.x to avoid duplicate reports. Coverage files are located in `mcp-server/coverage/`.
3362

.github/workflows/release.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
dry_run:
7+
description: "Dry run (no actual release)"
8+
type: boolean
9+
default: false
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
defaults:
15+
run:
16+
working-directory: ./mcp-server
17+
18+
permissions:
19+
contents: write
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- uses: actions/setup-node@v4
27+
with:
28+
node-version: "24.x"
29+
registry-url: "https://registry.npmjs.org"
30+
31+
- run: npm ci
32+
33+
- name: Configure Git
34+
run: |
35+
git config user.name "github-actions[bot]"
36+
git config user.email "github-actions[bot]@users.noreply.github.com"
37+
38+
- name: Release
39+
run: npx release-it --ci ${{ inputs.dry_run && '--dry-run' || '' }}
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Get a Currents API key by following the [instructions here](https://docs.current
3737

3838
### NPX
3939

40-
```
40+
```json
4141
{
4242
"mcpServers": {
4343
"currents": {
@@ -60,7 +60,7 @@ Add the following to your `claude_desktop_config.json`:
6060

6161
#### NPX
6262

63-
```
63+
```json
6464
{
6565
"mcpServers": {
6666
"currents": {

examples/todomvc/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/todomvc/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/todomvc/js/app.js

Lines changed: 0 additions & 119 deletions
This file was deleted.

0 commit comments

Comments
 (0)