Skip to content

test: github action

test: github action #2

Workflow file for this run

name: Build Plugin on Tag
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build plugin
run: ./gradlew buildPlugin --no-daemon --stacktrace -Dorg.gradle.java.home="${JAVA_HOME}"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: plugin-distributions-${{ github.ref_name }}
path: build/distributions/*.zip
if-no-files-found: error
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
files: |
build/distributions/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}