Skip to content

Commit

Permalink
Revert "Some changes in a hope it helps with build on CI[5]"
Browse files Browse the repository at this point in the history
This reverts commit 17555fb.
  • Loading branch information
madwareru committed Jul 30, 2021
1 parent 439c3d3 commit e1fa6e2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 51 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@

version: 2
updates:
# Maintain dependencies for Gradle dependencies
- package-ecosystem: "gradle"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
64 changes: 30 additions & 34 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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') }}
Expand Down Expand Up @@ -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') }}
Expand All @@ -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 }}
Expand All @@ -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') }}
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
17 changes: 8 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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 }}

Expand All @@ -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 }}

0 comments on commit e1fa6e2

Please sign in to comment.