From f2ef10ce829ecaa66cee9a1c50802f3f4dd27274 Mon Sep 17 00:00:00 2001 From: "Junk F. Actory" <2998269+junkfactory@users.noreply.github.com> Date: Sat, 3 Aug 2024 12:38:06 -0700 Subject: [PATCH] Improving release.yml (#2) * Improving release.yml * Add installation instructions and fix release creation --- .github/dependabot.yml | 17 +++++++++++++++++ .github/workflows/release.yml | 18 +++++++++++++++--- CHANGELOG.md | 1 - README.md | 9 ++++++++- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f6b0d11 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +# Dependabot configuration: +# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates + +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" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e33078f..de03bb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,9 @@ jobs: # Check out current repository - name: Fetch Sources uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + # Setup Java 11 environment for the next steps - name: Setup Java uses: actions/setup-java@v4 @@ -25,15 +28,24 @@ jobs: distribution: zulu java-version: 17 cache: gradle + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + gradle-home-cache-cleanup: true + - name: Build Plugin run: | - ./gradlew buildPlugin --no-daemon + VERSION=${{ github.ref_name }} + ./gradlew buildPlugin -PpluginVersion="${VERSION:1}" + - name: Publish Release env: DIST_DIR: "./build/distributions" run: | + VERSION=${{ github.ref_name }} PROJECT_NAME="$(basename ${{ github.repository }})" - PKG="$PROJECT_NAME-${{ github.ref_name }}.zip" + PKG="$PROJECT_NAME-${VERSION:1}.zip" ls -l "$DIST_DIR" - mv "$DIST_DIR/$PROJECT_NAME-snapshot.zip" "$DIST_DIR/$PKG" gh release create ${{ github.ref_name }} "$DIST_DIR/$PKG" --generate-notes \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b0d2f53..ff533e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,4 +5,3 @@ ## [Unreleased] - See [Releases](https://github.com/junkfactory/java-inner-builder/releases) for full changelog - diff --git a/README.md b/README.md index 3359fc3..67a6b0e 100644 --- a/README.md +++ b/README.md @@ -105,4 +105,11 @@ record Address(String street, String city, String state, String country) { } } } -``` \ No newline at end of file +``` + +## Installation + +1. Download plugin zip file from [Releases](https://github.com/junkfactory/java-inner-builder/releases) +2. Open IntelliJ IDEA, go to `File -> Settings -> Plugins` +3. Click on the gear icon and select `Install Plugin from Disk...` +4. Select the downloaded zip file and click `OK` \ No newline at end of file