Skip to content

Commit

Permalink
Automatic releasing (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDrivenMitch authored Feb 25, 2022
1 parent 2fd0bbf commit 08b5ee8
Show file tree
Hide file tree
Showing 10 changed files with 138 additions and 75 deletions.
35 changes: 23 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
version: 2
updates:
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
# Specify labels for pull requests
labels:
- "Type: Dependency Upgrade"
- "Priority 1: Must"
# Add reviewers
reviewers:
- "Morlack"
- package-ecosystem: gradle
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
# Specify labels for pull requests
labels:
- "Type: Dependency Upgrade"
- "Priority 1: Must"
# Add reviewers
reviewers:
- "Morlack"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
labels:
- "Type: Dependency Upgrade"
- "Priority 1: Must"
# Add reviewers
reviewers:
- "Morlack"
30 changes: 0 additions & 30 deletions .github/workflows/pluginverifier.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'

- name: Verify plugin
uses: gradle/gradle-build-action@v1
with:
arguments: runPluginVerifier

- name: Publish plugin
uses: gradle/gradle-build-action@v1
with:
arguments: publishPlugin
env: # Or as an environment variable
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test

on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Verify plugin
uses: gradle/gradle-build-action@v1
with:
arguments: runPluginVerifier
concurrency:
group: ${{github.workflow}}-${{github.head_ref || github.run_id }}
cancel-in-progress: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Fixed

- Fix popup on deadline manager methods when there are qualified references as arguments. Fixes #16
- Fix empty inspection description in inspection window. Fixes #21
- The correct icon is now shown for publishers in line marker popup. Fixes #18

### Changed
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Axon Framework IntelliJ Plugin
===================================
<!-- Plugin description -->
Supports developers while writing applications using [Axon Framework](https://axoniq.io/product-overview/axon-framework) version 4.x.

Supports developers while writing applications using [Axon Framework](https://axoniq.io/).

Axon Framework helps build scalable, extensible and maintainable applications by supporting developers apply the Command Query
Responsibility Separation (CQRS) architectural pattern.
Axon Framework helps build scalable, extensible, and maintainable applications by supporting developers to apply Domain-Driven Design (DDD),
Command-Query Responsibility Separation (CQRS), and Event Sourcing (ES). The framework provides a message-driven architecture with dedicated
command, event, and query messages, to support these paradigms.

The plugin provides the following features:

Expand All @@ -13,9 +14,11 @@ The plugin provides the following features:
- Marks methods used by Axon Framework as used, such as annotated methods
- Easy access to the reference guide (ctrl+shift+a and type axon)

If you have a feature request, or want to report a bug, please report this at
our [Github issue tracker](https://github.com/AxonFramework/IdeaPlugin/issues). For questions on Axon Framework usage, or about the plugin,
please visit our [Discuss](https://discuss.axoniq.io/)
If you have a feature request or want to report a bug, please report this at
our [Github issue tracker](https://github.com/AxonFramework/IdeaPlugin/issues).

For questions on Axon Framework usage, or about the plugin, please visit our [Discuss](https://discuss.axoniq.io/).
<!-- Plugin description end -->

## Usage

Expand All @@ -29,7 +32,18 @@ annotations it recognizes. You can click on the icons on the left of the sourcec

## Local development

You can run an IntelliJ instance with the plugin locally with `./gradlew runIde`. This will bootstrap a clean instance
and load the plugin. While the instance is running, you can run `./gradlew buildPlugin` for a hot reload of the plugin.
You can run an IntelliJ instance with the plugin locally with `./gradlew runIde`. This will bootstrap a clean instance and load the plugin.
While the instance is running, you can run `./gradlew buildPlugin` for a hot reload of the plugin.

To check compatibility with the most common IntelliJ versions run `./gradlew runPluginVerifier`.

## Development process

- Features are developed on branches
- The pull request should contain a changelog entry added to the "Unreleased" section
- When ready for release, `CHANGELOG.md` and `gradle.properties` are updated with the new version
- A tag is created with name `vx.x.x` on that commit and pushed. Github Actions will automatically publish that version

There are no minor release branches, since we don't need patch versions on older versions of the plugin. Users will always update to the
latest version and will ignore earlier patches, so the `master` branch is leading.

27 changes: 26 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright (c) 2022. Axon Framework
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

fun properties(key: String) = project.findProperty(key).toString()
Expand Down Expand Up @@ -70,7 +87,15 @@ tasks {

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription.set(
""
projectDir.resolve("README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
subList(indexOf(start) + 1, indexOf(end))
}.joinToString("\n").run { markdownToHTML(this) }
)

// Get the latest available change notes from the changelog file
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

pluginGroup=io.axoniq.ide.intellij
pluginName=Axon Framework
pluginVersion=0.5.0
pluginVersion=0.5.1

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class JavaAggregateIdInspection : AbstractBaseJavaLocalInspectionTool() {
isOnTheFly: Boolean
): Array<ProblemDescriptor>? {
if (!aClass.isAggregate()) {
return emptyArray()
return null
}
val isMissingFieldWithAnnotation = aClass.fields.none { field -> field.isAnnotated(AxonAnnotation.ENTITY_ID) }
if (isMissingFieldWithAnnotation) {
Expand All @@ -51,7 +51,7 @@ class JavaAggregateIdInspection : AbstractBaseJavaLocalInspectionTool() {
)
)
}
return emptyArray()
return null
}

override fun getStaticDescription(): String {
Expand Down
20 changes: 0 additions & 20 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@
<version>${project.version}</version>
<vendor url="https://axoniq.io/">AxonIQ</vendor>

<description>
<![CDATA[
Supports developers while writing applications using <a href="https://axoniq.io/product-overview/axon-framework">Axon Framework</a> version 4.x.<br/><br/>
Axon Framework helps build scalable, extensible, and maintainable applications by supporting developers to apply Domain-Driven Design (DDD), Command-Query Responsibility Separation (CQRS),
and Event Sourcing (ES). The framework provides a message-driven architecture with dedicated command, event, and query messages, to support these paradigms.<br/><br/>
The plugin provides the following features:
<ul>
<li>Line markers to visualize commands, events, queries and deadlines</li>
<li>Several inspections on code structure that is required for Axon Framework</li>
<li>Marks methods used by Axon Framework as used, such as annotated methods</li>
<li>Easy access to the reference guide (ctrl+shift+a and type axon)
</ul>
If you have a feature request or want to report a bug, please report this at our <a href="https://github.com/AxonFramework/IdeaPlugin/issues">Github issue tracker</a>.<br/>
For questions on Axon Framework usage, or about the plugin, please visit our <a href="https://discuss.axoniq.io/">Discuss</a>.
]]>
</description>

<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.java</depends>
<depends>org.jetbrains.kotlin</depends>
Expand Down

0 comments on commit 08b5ee8

Please sign in to comment.