This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch festure/release-flow
in repository https://gitbox.apache.org/repos/asf/struts-intellij-plugin.git

commit 4d2896f4bceee9f42a0cc73ecd2ee9cedf258a96
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Sun Aug 3 14:19:15 2025 +0200

    Prepares automatic release flow
---
 .github/workflows/release.yml | 113 ++++++++++++++++++++++++++++++++++++++++++
 .gitignore                    |   2 +
 gradle.properties             |   8 +--
 3 files changed, 119 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..0dd0aee
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,113 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+
+# GitHub Actions Workflow created for handling the release process based on 
the release draft
+# prepared with the Build workflow. Running the publishPlugin task requires 
the PUBLISH_TOKEN secret
+# provided.
+
+name: Release
+on:
+  release:
+    types: [prereleased, released]
+
+jobs:
+  release:
+    name: Publish Plugin
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+      pull-requests: write
+    steps:
+
+      # Free GitHub Actions Environment Disk Space
+      - name: Maximize Build Space
+        uses: jlumbroso/free-disk-space@v1.3.1
+        with:
+          tool-cache: false
+          large-packages: false
+
+      # Check out the current repository
+      - name: Fetch Sources
+        uses: actions/checkout@v4
+        with:
+          ref: ${{ github.event.release.tag_name }}
+
+      # Set up Java environment for the next steps
+      - name: Setup Java
+        uses: actions/setup-java@v4
+        with:
+          distribution: zulu
+          java-version: 17
+
+      # Setup Gradle
+      - name: Setup Gradle
+        uses: gradle/actions/setup-gradle@v4
+        with:
+          gradle-home-cache-cleanup: true
+
+      # Set environment variables
+      - name: Export Properties
+        id: properties
+        shell: bash
+        run: |
+          PROPERTIES="$(./gradlew properties --console=plain -q)"
+          VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
+          echo "version=$VERSION" >> $GITHUB_OUTPUT
+
+      # Update Unreleased section with the current release note
+      - name: Patch Changelog
+        if: ${{ steps.properties.outputs.changelog != '' }}
+        env:
+          CHANGELOG: ${{ steps.properties.outputs.changelog }}
+        run: |
+          ./gradlew patchChangelog --release-note="$CHANGELOG"
+
+      # Publish the plugin to JetBrains Marketplace
+      - name: Publish Plugin
+        env:
+          PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
+          CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
+          PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
+          PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
+        run: ./gradlew publishPlugin
+
+      # Upload artifact as a release asset
+      - name: Upload Release Asset
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: gh release upload ${{ github.event.release.tag_name }} 
./build/distributions/*
+
+      # Create a pull request with changelog update
+      - name: Create Pull Request
+        if: ${{ steps.properties.outputs.changelog != '' }}
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        run: |
+          VERSION="${{ steps.properties.outputs.version }}"
+          BRANCH="changelog-update-$VERSION"
+          LABEL="release changelog"
+
+          git config user.email "act...@github.com"
+          git config user.name "GitHub Action"
+
+          git checkout -b $BRANCH
+          git commit -am "Changelog update - $VERSION"
+          git push --set-upstream origin $BRANCH
+
+          gh pr create \
+            --title "Changelog update - \`$VERSION\`" \
+            --body "Current pull request contains patched \`CHANGELOG.md\` 
file for the \`$VERSION\` version." \
+            --label "$LABEL" \
+            --head $BRANCH
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0fbed68..e0da412 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,5 @@ bin/
 
 ### Claude Code ###
 .claude
+
+.cert
diff --git a/gradle.properties b/gradle.properties
index d5c8275..728a3a4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -4,14 +4,14 @@ pluginGroup = com.intellij.struts2
 pluginName = struts2
 pluginRepositoryUrl = https://github.com/apache/struts-intellij-plugin/
 # SemVer format -> https://semver.org
-pluginVersion = 241.18968.1
+pluginVersion = 251.4.1
 
 # Supported build number ranges and IntelliJ Platform versions -> 
https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
-pluginSinceBuild = 233
-pluginUntilBuild = 241.*
+pluginSinceBuild = 251
+pluginUntilBuild = 251.*
 
 # IntelliJ Platform Properties -> 
https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
-platformVersion = 2023.3
+platformVersion = 2025.1.4
 
 # Gradle Releases -> https://github.com/gradle/gradle/releases
 gradleVersion = 8.9

Reply via email to