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
92
103on :
114 release :
@@ -20,25 +13,27 @@ jobs:
2013 packages : write
2114
2215 steps :
23- - uses : actions/checkout@v4
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
2419 - name : Set up JDK 17
2520 uses : actions/setup-java@v4
2621 with :
2722 java-version : ' 17'
2823 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
3124
3225 - name : Setup Gradle
33- uses : gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
26+ uses : gradle/actions/setup-gradle@v4
3427
35- - name : Build with Gradle
36- run : ./gradlew build
28+ - name : Build Plugin with Gradle
29+ run : ./gradlew buildPlugin
3730
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
4233 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