Skip to content

Commit 96e5612

Browse files
committed
run github actions
1 parent edeb775 commit 96e5612

4 files changed

Lines changed: 64 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Build and Release Plugin
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
8+
jobs:
9+
build-artifact:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
distribution: 'temurin'
19+
java-version: '21'
20+
21+
- name: Set up Gradle
22+
uses: gradle/gradle-build-action@v3
23+
24+
- name: Extract plugin version
25+
id: get_version
26+
run: |
27+
version=$(grep '^pluginVersion=' gradle.properties | cut -d'=' -f2)
28+
echo "PLUGIN_VERSION=$version" >> $GITHUB_ENV
29+
30+
- name: Build plugin
31+
run: ./gradlew buildPlugin
32+
33+
- name: Rename plugin artifact
34+
run: |
35+
mv build/distributions/*.zip YALI_${{ env.PLUGIN_VERSION }}.zip
36+
37+
- name: Upload artifact
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: YALI_${{ env.PLUGIN_VERSION }}
41+
path: YALI_${{ env.PLUGIN_VERSION }}.zip
42+
43+
release:
44+
if: github.ref == 'refs/heads/master'
45+
needs: build-artifact
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Download artifact
49+
uses: actions/download-artifact@v4
50+
with:
51+
name: YALI_${{ env.PLUGIN_VERSION }}
52+
53+
- name: Create Release and Upload Artifact
54+
uses: softprops/action-gh-release@v2
55+
with:
56+
tag_name: v${{ env.PLUGIN_VERSION }}
57+
name: Release v${{ env.PLUGIN_VERSION }}
58+
files: YALI_${{ env.PLUGIN_VERSION }}.zip
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ hs_err_pid*
3737
/.kotlin
3838
log.txt
3939
android-layout-inspector-settings.json
40+
# Исключить артефакты сборки плагина
41+
YALI_*.zip

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pluginName=android-layout-inspector-plugin
2020
# for insight into build numbers and IntelliJ Platform versions.
2121
#TODO: set to 252.*
2222
sinceBuild=243.22562.145
23-
pluginVersion=25.06.18.0
23+
pluginVersion=25.08.04.0
2424
# Use the latest of Android plugin versionAdd commentMore actions
2525
# see https://github.com/JetBrains/intellij-platform-gradle-plugin/releases
2626
androidPluginVersion=243.22562.218

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pluginManagement {
66
}
77
}
88

9-
rootProject.name = 'android-layout-inspector-plugin'
9+
rootProject.name = 'YALI'

0 commit comments

Comments
 (0)