diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml new file mode 100644 index 0000000..4c6c74a --- /dev/null +++ b/.github/workflows/build-plugin.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1d145d2..281277e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .idea .gradle *.iml +.intellijPlatform build/ out local.properties diff --git a/gradle.properties b/gradle.properties index df33612..0cab4d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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.