Skip to content

Commit 0c968c9

Browse files
committed
Add github-gradle plugin and use publishGithub task in build workflow
1 parent 623a9a6 commit 0c968c9

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ jobs:
4848
- name: Grant execute permission for gradlew
4949
run: chmod +x gradlew
5050

51-
- name: Run build with Gradle Wrapper
52-
run: ./gradlew build -x test --no-daemon -Partifact_version=${{ github.ref_name }}
53-
54-
- name: Create Release and Upload Jar
55-
run: |
56-
gh release create ${{ github.ref_name }} -t "Release ${{ github.ref_name }}"
57-
gh release upload "${{ github.ref_name }}" build/libs/* --clobber
51+
- name: Publish GitHub Release
52+
run: ./gradlew publishGithub -Partifact_version=${{ github.ref_name }}
5853
env:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
GITHUB_TOKEN: ${{ secrets.PAT }}

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id "java-library"
33
id "com.github.johnrengelman.shadow" version "8.1.1"
44
id "io.github.intisy.online-gradle" version "1.7.2"
5+
id "io.github.intisy.github-gradle" version "1.7.3"
56
}
67

78
online {
@@ -13,6 +14,10 @@ online {
1314
]
1415
}
1516

17+
github {
18+
accessToken = System.getenv("GITHUB_TOKEN") ?: ""
19+
}
20+
1621
repositories {
1722
mavenLocal()
1823
mavenCentral()

0 commit comments

Comments
 (0)