Skip to content

Add AdbService.getDebugBridge() as alternative method and log all sea… #81

Add AdbService.getDebugBridge() as alternative method and log all sea…

Add AdbService.getDebugBridge() as alternative method and log all sea… #81

Workflow file for this run

name: Build and Release Plugin
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build-artifact:
runs-on: ubuntu-latest
outputs:
plugin_version: ${{ steps.get_version.outputs.plugin_version }}
is_master: ${{ steps.check_branch.outputs.is_master }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
with:
gradle-version: '8.13'
cache-disabled: true
- name: Extract plugin version
id: get_version
run: |
version=$(grep '^pluginVersion=' gradle.properties | cut -d'=' -f2)
echo "$version" > plugin-version.txt
echo "plugin_version=$version" >> $GITHUB_OUTPUT
- name: Check if master branch
id: check_branch
run: |
if [ "${{ github.ref }}" == "refs/heads/master" ]; then
echo "is_master=true" >> $GITHUB_OUTPUT
else
echo "is_master=false" >> $GITHUB_OUTPUT
fi
- name: Build plugin
run: ./gradlew buildPlugin
- name: Rename plugin artifact
run: |
mv build/distributions/*.zip YALI_${{ steps.get_version.outputs.plugin_version }}.zip
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: YALI_${{ steps.get_version.outputs.plugin_version }}
path: YALI_${{ steps.get_version.outputs.plugin_version }}.zip
- name: Upload plugin version file
uses: actions/upload-artifact@v4
with:
name: plugin-version
path: plugin-version.txt
release:
if: needs.build-artifact.outputs.is_master == 'true'
needs: build-artifact
runs-on: ubuntu-latest
steps:
- name: Download plugin version file
uses: actions/download-artifact@v4
with:
name: plugin-version
- name: Read plugin version
id: read_version
run: |
version=$(cat plugin-version.txt)
echo "plugin_version=$version" >> $GITHUB_OUTPUT
- name: Download plugin artifact
uses: actions/download-artifact@v4
with:
name: YALI_${{ steps.read_version.outputs.plugin_version }}
- name: Create Release and Upload Artifact
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.read_version.outputs.plugin_version }}
name: Release v${{ steps.read_version.outputs.plugin_version }}
files: YALI_${{ steps.read_version.outputs.plugin_version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}