File tree Expand file tree Collapse file tree 1 file changed +13
-29
lines changed Expand file tree Collapse file tree 1 file changed +13
-29
lines changed Original file line number Diff line number Diff line change 12
12
types : [created]
13
13
14
14
jobs :
15
- build :
16
-
15
+ publish :
17
16
runs-on : ubuntu-latest
18
- permissions :
19
- contents : read
20
- packages : write
21
-
22
17
steps :
23
- - uses : actions/checkout@v3
24
- - name : Set up JDK 11
25
- uses : actions/setup-java@v3
26
- with :
27
- java-version : ' 11'
28
- 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
-
32
- - name : Build with Gradle
33
- uses : gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
34
- with :
35
- arguments : build
36
-
37
- # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
38
- # the publishing section of your build.gradle
39
- - name : Publish to GitHub Packages
40
- uses : gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
41
- with :
42
- arguments : publish
43
- env :
44
- MAVEN_NAME : ${{ secrets.MAVEN_NAME }} # token
45
- MAVEN_TOKEN : ${{ secrets.MAVEN_TOKEN }} # password
18
+ - uses : actions/checkout@v2
19
+ - name : Set up JDK
20
+ uses : actions/setup-java@v1
21
+ with :
22
+ java-version : 11
23
+ - name : Grant execute permission for gradlew
24
+ run : chmod +x gradlew
25
+ - name : Publish with Gradle
26
+ run : ./gradlew build publish
27
+ env :
28
+ MAVEN_NAME : ${{ secrets.MAVEN_NAME }} # token
29
+ MAVEN_TOKEN : ${{ secrets.MAVEN_TOKEN }} # password
You can’t perform that action at this time.
0 commit comments