Correct sister plugin name #15
This file contains 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
# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps: | |
# - Validate Gradle Wrapper. | |
# - Run 'test' and 'verifyPlugin' tasks. | |
# - Run Qodana inspections. | |
# - Run the 'buildPlugin' task and prepare artifact for further tests. | |
# - Run the 'runPluginVerifier' task. | |
# - Create a draft release. | |
# | |
# The workflow is triggered on push and pull_request events. | |
# | |
# GitHub Actions reference: https://help.github.com/en/actions | |
# | |
## JBIJPPTPL | |
name: Build | |
on: | |
# Trigger the workflow on pushes to only the 'main' branch | |
# (this avoids duplicate checks being run e.g., for dependabot pull requests) | |
push: | |
branches: [ master ] | |
# Trigger the workflow on any pull request | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Prepare environment and build the plugin | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
outputs: | |
version: ${{ steps.properties.outputs.version }} | |
changelog: ${{ steps.properties.outputs.changelog }} | |
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} | |
steps: | |
# Check out current repository | |
- | |
name: Fetch sources | |
uses: actions/checkout@v4 | |
- | |
name: Gradle Wrapper validation | |
uses: gradle/wrapper-validation-action@v2.1.1 | |
- | |
name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- | |
name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
- | |
name: Export properties | |
id: properties | |
shell: bash | |
run: | | |
chmod +x ./gradlew | |
PROPERTIES="$(./gradlew properties --console=plain -q)" | |
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" | |
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT | |
echo "changelog<<EOF" >> $GITHUB_OUTPUT | |
echo "$CHANGELOG" >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier | |
- | |
name: Build plugin | |
run: ./gradlew buildPlugin | |
- | |
name: Push ZIP to the "build" branch | |
uses: s0/git-publish-subdir-action@v2.6.0 | |
if: github.event_name == 'push' | |
env: | |
REPO: self | |
BRANCH: build | |
FOLDER: build/distributions/ | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MESSAGE: "{msg} ({sha})" | |
- | |
name: Prepare plugin artifact | |
id: artifact | |
shell: bash | |
run: | | |
cd ${{ github.workspace }}/build/distributions | |
FILENAME=`ls *.zip` | |
unzip "$FILENAME" -d content | |
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT | |
- | |
name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ steps.artifact.outputs.filename }} | |
path: ./build/distributions/content/*/* |