#20 Allow to sync layouts panel scale and offset with other layouts w… #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Plugin | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| build-artifact: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| plugin_version: ${{ steps.get_version.outputs.plugin_version }} | |
| 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/gradle-build-action@v3 | |
| - 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: 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: github.ref == 'refs/heads/master' | |
| 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 }} |