Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build and Release Plugin

on:
pull_request:
types: [closed]
branches:
- master

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Build plugin
run: ./gradlew buildPlugin

- name: Get version from gradle.properties
id: get_version
run: |
version=$(grep '^yampVersion=' gradle.properties | cut -d'=' -f2)
echo "version=$version" >> $GITHUB_OUTPUT

- name: Rename plugin artifact
run: |
mv plugin/build/distributions/*.zip plugin/build/distributions/yamp_plugin_${{ steps.get_version.outputs.version }}.zip

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.get_version.outputs.version }}
release_name: Release v${{ steps.get_version.outputs.version }}
draft: false
prerelease: false

- name: Upload plugin artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: plugin/build/distributions/yamp_plugin_${{ steps.get_version.outputs.version }}.zip
asset_name: yamp_plugin_${{ steps.get_version.outputs.version }}.zip
asset_content_type: application/zip
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea
.gradle
*.iml
.intellijPlatform
build/
out
local.properties
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ studioCompilePath=/Applications/Android Studio.app/Contents

pluginGroup = com.github.grishberg
pluginName = android-methods-profiler
yampVersion = 25.08.03
yampVersion = 25.08.04

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
Expand Down
Loading