1
- # This workflow uses actions that are not certified by GitHub.
2
- # They are provided by a third-party and are governed by
3
- # separate terms of service, privacy policy, and support
4
- # documentation.
5
- # This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6
- # For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7
-
8
- name : Gradle Package
1
+ name : Gradle Plugin Release
9
2
10
3
on :
11
4
release :
@@ -20,25 +13,27 @@ jobs:
20
13
packages : write
21
14
22
15
steps :
23
- - uses : actions/checkout@v4
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+
24
19
- name : Set up JDK 17
25
20
uses : actions/setup-java@v4
26
21
with :
27
22
java-version : ' 17'
28
23
distribution : ' temurin'
29
- server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
30
- settings-path : ${{ github.workspace }} # location for the settings.xml file
31
24
32
25
- name : Setup Gradle
33
- uses : gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
26
+ uses : gradle/actions/setup-gradle@v4
34
27
35
- - name : Build with Gradle
36
- run : ./gradlew build
28
+ - name : Build Plugin with Gradle
29
+ run : ./gradlew buildPlugin
37
30
38
- # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
39
- # the publishing section of your build.gradle
40
- - name : Publish to GitHub Packages
41
- run : ./gradlew publish
31
+ - name : Upload Plugin to GitHub Release
32
+ uses : actions/upload-release-asset@v1
42
33
env :
43
- USERNAME : ${{ github.actor }}
44
- TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ with :
36
+ upload_url : ${{ github.event.release.upload_url }}
37
+ asset_path : ./build/libs/SecurityInspector-${{ github.event.release.tag_name }}.jar
38
+ asset_name : SecurityInspector-${{ github.event.release.tag_name }}.jar
39
+ asset_content_type : application/java-archive
0 commit comments