Skip to content

Commit 1d86817

Browse files
committed
build and publish workflows
1 parent 061c5c6 commit 1d86817

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Plugin Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- "1.21.0"
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out repository
14+
uses: actions/checkout@v4
15+
with:
16+
persist-credentials: false
17+
18+
- name: Setup JDK
19+
uses: actions/setup-java@v4
20+
with:
21+
java-version: '23'
22+
distribution: 'temurin'
23+
24+
- name: Elevate wrapper permissions
25+
run: chmod +x ./gradlew
26+
27+
- name: Setup Gradle
28+
uses: gradle/actions/setup-gradle@v4
29+
with:
30+
dependency-graph: generate-and-submit
31+
32+
- name: Build Plugin
33+
run: ./gradlew build
34+
35+
- name: Upload Plugin Artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: plugin
39+
path: build/libs/*.jar

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Plugin
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
14+
15+
- name: Setup JDK
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '23'
19+
distribution: 'temurin'
20+
21+
- name: Elevate wrapper permissions
22+
run: chmod +x ./gradlew
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
with:
27+
dependency-graph: generate-and-submit
28+
29+
- name: Build Plugin
30+
run: ./gradlew build
31+
32+
- name: Upload Plugin Artifact
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: plugin
36+
path: build/libs/*.jar
37+
38+
- name: Get Plugin Version
39+
run: echo "PLUGIN_VERSION=$(grep '^plugin_version=' gradle.properties | cut -d'=' -f2)" >> $GITHUB_ENV
40+
41+
- name: Publish Plugin Github Release
42+
uses: ncipollo/release-action@v1
43+
with:
44+
tag: ${{ env.PLUGIN_VERSION }}
45+
artifacts: build/libs/*.jar
46+
generateReleaseNotes: true

0 commit comments

Comments
 (0)