Skip to content

Commit 67ee98a

Browse files
committed
Add GitHub Actions release workflow
- Add automated build and release on version tags - Add comprehensive changelog with version history - Update README with GitHub releases installation instructions - Set up professional distribution workflow
1 parent 1534b22 commit 67ee98a

File tree

3 files changed

+156
-9
lines changed

3 files changed

+156
-9
lines changed

.github/workflows/release.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Build and Release Layer Dog Plugin
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags (v1.0.0, v1.0.1, etc.)
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
build-and-release:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Java 17
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: '17'
22+
23+
- name: Setup Gradle
24+
uses: gradle/gradle-build-action@v2
25+
26+
- name: Make gradlew executable
27+
run: chmod +x ./gradlew
28+
29+
- name: Build Plugin
30+
run: ./gradlew buildPlugin --no-daemon
31+
32+
- name: Get Plugin Info
33+
id: plugin_info
34+
run: |
35+
echo "version=$(grep '^version = ' build.gradle.kts | sed 's/version = "\(.*\)"/\1/')" >> $GITHUB_OUTPUT
36+
echo "plugin_name=layer-dog" >> $GITHUB_OUTPUT
37+
38+
- name: Create Release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
name: "Layer Dog v${{ steps.plugin_info.outputs.version }}"
42+
files: |
43+
build/distributions/*.zip
44+
body: |
45+
## 🐕 Layer Dog Plugin v${{ steps.plugin_info.outputs.version }}
46+
47+
### 🚀 Installation
48+
1. Download `layer-dog-${{ steps.plugin_info.outputs.version }}.zip`
49+
2. In IntelliJ IDEA: `File → Settings → Plugins`
50+
3. Click ⚙️ → `Install Plugin from Disk...`
51+
4. Select the downloaded ZIP file
52+
5. Restart IntelliJ IDEA
53+
54+
### ✨ Features
55+
- Real-time architectural layer violation detection
56+
- Supports Controller, DTO, API, FLOW, and DAO layers
57+
- Warning-level highlighting (yellow squiggles)
58+
- Quick fix suggestions
59+
- Maven project compatibility
60+
61+
### 🧪 Test It Out
62+
```java
63+
@RestController
64+
public class TestController {
65+
private UserService service; // ⚠️ Should show layer violation warning
66+
}
67+
```
68+
69+
### 📋 Layer Rules
70+
- **Controller** → DTO only
71+
- **DTO** → API only
72+
- **API** → DAO/FLOW only
73+
- **FLOW** → Multiple APIs
74+
- **DAO** → Database only
75+
draft: false
76+
prerelease: false
77+
env:
78+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Changelog
2+
3+
All notable changes to the Layer Dog plugin will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [1.0.3] - 2025-08-16
11+
12+
### Changed
13+
- **BREAKING**: Layer violations now show as **warnings** (yellow squiggles) instead of errors (red squiggles)
14+
- Improved user experience - warnings don't interfere with compilation errors
15+
- Better visual distinction between architectural guidelines and critical errors
16+
17+
### Fixed
18+
- Fixed plugin configuration issue with message bundles
19+
- Resolved "Can't find inspection description" error
20+
- Improved plugin loading and registration
21+
22+
## [1.0.2] - 2025-08-16
23+
24+
### Fixed
25+
- Updated compatibility to support IntelliJ IDEA 2024.2+ (build 252.*)
26+
- Fixed plugin installation compatibility issues
27+
28+
## [1.0.1] - 2025-08-16
29+
30+
### Fixed
31+
- Initial compatibility fix for IntelliJ IDEA versions
32+
33+
## [1.0.0] - 2025-08-16
34+
35+
### Added
36+
- **Initial release** 🎉
37+
- Real-time architectural layer violation detection
38+
- Support for 5 architectural layers:
39+
- **Controller Layer**: Should only call DTO layer
40+
- **DTO Layer**: Should only call API layer
41+
- **API Layer**: Should call DAO/FLOW layers, not other APIs
42+
- **FLOW Layer**: Should orchestrate multiple API calls
43+
- **DAO Layer**: Should only interact with database
44+
- Smart layer detection based on:
45+
- Class naming conventions (Controller, Service, DAO, etc.)
46+
- Package structure (controller, api, dao packages)
47+
- Spring annotations (@RestController, @Service, @Repository)
48+
- Quick fix suggestions for common violations
49+
- Maven project compatibility
50+
- IntelliJ IDEA 2023.2+ support
51+
52+
### Features
53+
- **Layer Detection**: Automatic identification of architectural layers
54+
- **Real-time Validation**: Violations highlighted as you type
55+
- **Warning-level Highlighting**: Non-intrusive yellow squiggles
56+
- **Contextual Messages**: Clear violation descriptions with hover tooltips
57+
- **Quick Fixes**: Actionable suggestions to resolve violations
58+
- **Comprehensive Coverage**: All major architectural patterns supported
59+
60+
[unreleased]: https://github.com/muneeb-i-khan/LayerDog/compare/v1.0.3...HEAD
61+
[1.0.3]: https://github.com/muneeb-i-khan/LayerDog/compare/v1.0.2...v1.0.3
62+
[1.0.2]: https://github.com/muneeb-i-khan/LayerDog/compare/v1.0.1...v1.0.2
63+
[1.0.1]: https://github.com/muneeb-i-khan/LayerDog/compare/v1.0.0...v1.0.1
64+
[1.0.0]: https://github.com/muneebk/LayerDog/releases/tag/v1.0.0

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,20 +47,25 @@ The plugin enforces the following layering rules:
4747

4848
## Installation
4949

50-
### Building the Plugin
50+
### 📥 Download from GitHub Releases (Recommended)
51+
52+
1. **Download the latest plugin**:
53+
- Go to [Releases](https://github.com/muneeb-i-khan/LayerDog/releases)
54+
- Download `layer-dog-x.x.x.zip` from the latest release
55+
56+
2. **Install in IntelliJ IDEA**:
57+
- Go to `File → Settings → Plugins`
58+
- Click the ⚙️ gear icon and select `Install Plugin from Disk...`
59+
- Select the downloaded ZIP file
60+
- Restart IntelliJ IDEA
61+
62+
### 🛠️ Building from Source (Advanced)
5163

5264
1. Clone this repository
53-
2. Open in IntelliJ IDEA
65+
2. Open in IntelliJ IDEA
5466
3. Run the Gradle task: `./gradlew buildPlugin`
5567
4. The plugin will be built in `build/distributions/`
5668

57-
### Installing in IntelliJ IDEA
58-
59-
1. Go to `File → Settings → Plugins`
60-
2. Click the gear icon and select `Install Plugin from Disk...`
61-
3. Select the built plugin ZIP file
62-
4. Restart IntelliJ IDEA
63-
6469
## Usage
6570

6671
Once installed, the plugin automatically checks your Java code for layer violations:

0 commit comments

Comments
 (0)