Skip to content

Commit

Permalink
Update Build Action and Injection
Browse files Browse the repository at this point in the history
  • Loading branch information
nailujx86 committed Jun 21, 2024
1 parent 1a6b996 commit 423b3bd
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 35 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [ main, ci-cd-improvements ]
pull_request:


jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt-hotspot
- name: Set Variables
id: environment
shell: bash
run: |
LATEST_TAG = git describe --tags --abbrev=0
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
- name: Build plugin
run: |
chmod +x gradlew
./gradlew check buildPlugin
- name: Unpack unsigned plugin for repackaging
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
unzip *.zip -d pluginfiles
- name: Upload built plugin
uses: actions/upload-artifact@v4
with:
name: autoconfig-plugin-${{ steps.environment.outputs.latest_tag }}
path: build/distributions/pluginfiles/*/*

31 changes: 0 additions & 31 deletions .github/workflows/gradle.yml

This file was deleted.

9 changes: 7 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ plugins {
id "org.jsonschema2pojo" version "1.2.1"
}

group = getProperty("pluginGroup")
version = getProperty("pluginVersion")

allprojects {

group 'de.gebit.plugins.autoconfig'
Expand All @@ -22,10 +25,12 @@ allprojects {
}

patchPluginXml {
version = getProperty("pluginVersion")
sinceBuild = "232.1"
untilBuild = "241.*"
pluginDescription = new File("metadata/description.html").text
changeNotes = new File("metadata/changelog.html").text
def bodyMatcher = /(?s)(?<=<body>).*(?=<\/body>)/
pluginDescription = new File("metadata/description.html").text.findAll(bodyMatcher)?[0]
changeNotes = new File("metadata/changelog.html").text.findAll(bodyMatcher)?[0]
}

signPlugin {
Expand Down
5 changes: 5 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
# Autoconfig Plugin Properties
pluginVersion = 0.0.2
pluginGroup = de.gebit.plugins.autoconfig

# IntelliJ Plugin Build Support
kotlin.stdlib.default.dependency = false
3 changes: 1 addition & 2 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<id>de.gebit.plugins.autoconfig</id>
<name>Autoconfig</name>
<vendor email="[email protected]" url="https://github.com/GEBIT/autoconfig-intellij-plugin">GEBIT Solutions GmbH</vendor>

<version>0.0.1</version>

<idea-version since-build="232.1"/>

<depends>com.intellij.modules.json</depends>
Expand Down

0 comments on commit 423b3bd

Please sign in to comment.