generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Some changes in a hope it helps with build on CI[5]"
This reverts commit 17555fb.
- Loading branch information
Showing
3 changed files
with
38 additions
and
51 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
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 |
---|---|---|
|
@@ -14,13 +14,7 @@ | |
## 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: [main] | ||
# Trigger the workflow on any pull request | ||
pull_request: | ||
|
||
on: [push, pull_request] | ||
jobs: | ||
|
||
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum | ||
|
@@ -31,11 +25,11 @@ jobs: | |
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
|
||
# Validate wrapper | ||
- name: Gradle Wrapper Validation | ||
uses: gradle/[email protected].4 | ||
uses: gradle/[email protected].3 | ||
|
||
# Run verifyPlugin and test Gradle tasks | ||
test: | ||
|
@@ -46,25 +40,24 @@ jobs: | |
|
||
# Setup Java 1.8 environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
java-version: 11 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2.1.6 | ||
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.1.6 | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
@@ -92,25 +85,24 @@ jobs: | |
|
||
# Setup Java 1.8 environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
java-version: 11 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2.1.6 | ||
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.1.6 | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
@@ -122,23 +114,25 @@ jobs: | |
run: | | ||
PROPERTIES="$(./gradlew properties --console=plain -q)" | ||
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" | ||
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | 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@v2.2.3 | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: plugin-artifact | ||
path: ./build/distributions/${{ steps.properties.outputs.artifact }} | ||
|
@@ -153,25 +147,24 @@ jobs: | |
|
||
# Setup Java 1.8 environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
java-version: 11 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
|
||
# Cache Gradle Dependencies | ||
- name: Setup Gradle Dependencies Cache | ||
uses: actions/cache@v2.1.6 | ||
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.1.6 | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | ||
|
@@ -183,11 +176,13 @@ jobs: | |
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.1.6 | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides | ||
key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} | ||
|
@@ -207,7 +202,7 @@ jobs: | |
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
|
||
# Remove old release drafts by using the curl request for the available releases with draft flag | ||
- name: Remove Old Release Drafts | ||
|
@@ -219,10 +214,11 @@ jobs: | |
| jq '.[] | select(.draft == true) | .id' \ | ||
| xargs -I '{}' \ | ||
curl -X DELETE -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/repos/$GITHUB_REPOSITORY/releases/{} | ||
# Create new release draft - which is not publicly visible and requires manual acceptance | ||
- name: Create Release Draft | ||
id: createDraft | ||
uses: actions/create-release@v1.1.4 | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
|
@@ -240,11 +236,11 @@ jobs: | |
# Upload artifact as a release asset | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1.0.2 | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.createDraft.outputs.upload_url }} | ||
asset_path: ./${{ needs.build.outputs.artifact }} | ||
asset_name: ${{ needs.build.outputs.artifact }} | ||
asset_content_type: application/zip | ||
asset_content_type: application/zip |
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 |
---|---|---|
|
@@ -16,14 +16,13 @@ jobs: | |
|
||
# Setup Java 1.8 environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
java-version: 11 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
|
||
|
@@ -42,14 +41,13 @@ jobs: | |
|
||
# Setup Java 1.8 environment for the next steps | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v1 | ||
with: | ||
distribution: zulu | ||
java-version: 8 | ||
java-version: 11 | ||
|
||
# Check out current repository | ||
- name: Fetch Sources | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.release.tag_name }} | ||
|
||
|
@@ -63,9 +61,10 @@ jobs: | |
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "Update changelog" -a | ||
# Push changes | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
branch: main | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |