-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
232 additions
and
232 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,182 +13,182 @@ | |
# | ||
|
||
name: Build | ||
on: [push, pull_request] | ||
on: [ push, pull_request ] | ||
jobs: | ||
|
||
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum | ||
gradleValidation: | ||
name: Gradle Wrapper | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Validate wrapper | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/[email protected] | ||
|
||
# Run verifyPlugin and test Gradle tasks | ||
test: | ||
name: Test | ||
needs: gradleValidation | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Run tests | ||
- name: Run Linters and Test | ||
run: ./gradlew check | ||
|
||
# Run verifyPlugin Gradle task | ||
- name: Verify Plugin | ||
run: ./gradlew verifyPlugin | ||
|
||
# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs | ||
# Requires test job to be passed | ||
build: | ||
name: Build | ||
needs: test | ||
runs-on: ubuntu-latest | ||
outputs: | ||
name: ${{ steps.properties.outputs.name }} | ||
version: ${{ steps.properties.outputs.version }} | ||
changelog: ${{ steps.properties.outputs.changelog }} | ||
artifact: ${{ steps.properties.outputs.artifact }} | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Set environment variables | ||
- name: Export Properties | ||
id: properties | ||
shell: bash | ||
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" | ||
NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')" | ||
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" | ||
CHANGELOG="${CHANGELOG//'%'/'%25'}" | ||
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | ||
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | ||
ARTIFACT="${NAME}-${VERSION}.zip" | ||
echo "::set-output name=version::$VERSION" | ||
echo "::set-output name=name::$NAME" | ||
echo "::set-output name=changelog::$CHANGELOG" | ||
echo "::set-output name=artifact::$ARTIFACT" | ||
# Build artifact using buildPlugin Gradle task | ||
- name: Build Plugin | ||
run: ./gradlew buildPlugin | ||
|
||
# Upload plugin artifact to make it available in the next jobs | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: plugin-artifact | ||
path: ./build/distributions/${{ steps.properties.outputs.artifact }} | ||
|
||
# Verify built plugin using IntelliJ Plugin Verifier tool | ||
# Requires build job to be passed | ||
verify: | ||
name: Verify | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Set environment variables | ||
- name: Export Properties | ||
id: properties | ||
shell: bash | ||
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)" | ||
echo "::set-output name=ideVersions::$IDE_VERSIONS" | ||
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" | ||
# Cache Plugin Verifier IDEs | ||
- name: Setup Plugin Verifier IDEs Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides | ||
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} | ||
|
||
# Run IntelliJ Plugin Verifier action using GitHub Action | ||
- name: Verify Plugin | ||
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} | ||
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum | ||
gradleValidation: | ||
name: Gradle Wrapper | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Validate wrapper | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/[email protected] | ||
|
||
# Run verifyPlugin and test Gradle tasks | ||
test: | ||
name: Test | ||
needs: gradleValidation | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Run tests | ||
- name: Run Linters and Test | ||
run: ./gradlew check | ||
|
||
# Run verifyPlugin Gradle task | ||
- name: Verify Plugin | ||
run: ./gradlew verifyPlugin | ||
|
||
# Build plugin with buildPlugin Gradle task and provide the artifact for the next workflow jobs | ||
# Requires test job to be passed | ||
build: | ||
name: Build | ||
needs: test | ||
runs-on: ubuntu-latest | ||
outputs: | ||
name: ${{ steps.properties.outputs.name }} | ||
version: ${{ steps.properties.outputs.version }} | ||
changelog: ${{ steps.properties.outputs.changelog }} | ||
artifact: ${{ steps.properties.outputs.artifact }} | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Set environment variables | ||
- name: Export Properties | ||
id: properties | ||
shell: bash | ||
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" | ||
NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')" | ||
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" | ||
CHANGELOG="${CHANGELOG//'%'/'%25'}" | ||
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | ||
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | ||
ARTIFACT="${NAME}-${VERSION}.zip" | ||
echo "::set-output name=version::$VERSION" | ||
echo "::set-output name=name::$NAME" | ||
echo "::set-output name=changelog::$CHANGELOG" | ||
echo "::set-output name=artifact::$ARTIFACT" | ||
# Build artifact using buildPlugin Gradle task | ||
- name: Build Plugin | ||
run: ./gradlew buildPlugin | ||
|
||
# Upload plugin artifact to make it available in the next jobs | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: plugin-artifact | ||
path: ./build/distributions/${{ steps.properties.outputs.artifact }} | ||
|
||
# Verify built plugin using IntelliJ Plugin Verifier tool | ||
# Requires build job to be passed | ||
verify: | ||
name: Verify | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Setup Java environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/caches | ||
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | ||
|
||
# Cache Gradle Wrapper | ||
- name: Setup Gradle Wrapper Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
||
# Set environment variables | ||
- name: Export Properties | ||
id: properties | ||
shell: bash | ||
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
IDE_VERSIONS="$(echo "$PROPERTIES" | grep "^pluginVerifierIdeVersions:" | base64)" | ||
echo "::set-output name=ideVersions::$IDE_VERSIONS" | ||
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" | ||
# Cache Plugin Verifier IDEs | ||
- name: Setup Plugin Verifier IDEs Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides | ||
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} | ||
|
||
# Run IntelliJ Plugin Verifier action using GitHub Action | ||
- name: Verify Plugin | ||
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} |
Oops, something went wrong.