File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 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:Manually Gradle Package
9+ on :
10+ workflow_dispatch :
11+ inputs :
12+ branch :
13+ description : ' Test Branch'
14+ required : true
15+ default : ' main'
16+
17+ jobs :
18+ build :
19+
20+ runs-on : ubuntu-latest
21+ permissions :
22+ contents : read
23+ packages : write
24+
25+ steps :
26+ - uses : actions/checkout@v4
27+ - name : Set up JDK 17
28+ uses : actions/setup-java@v4
29+ with :
30+ java-version : ' 17'
31+ distribution : ' temurin'
32+ server-id : github # Value of the distributionManagement/repository/id field of the pom.xml
33+ settings-path : ${{ github.workspace }} # location for the settings.xml file
34+
35+ - name : Setup Gradle
36+ uses : gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0
37+
38+ - name : Build with Gradle
39+ run : ./gradlew build
40+
41+ # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
42+ # the publishing section of your build.gradle
43+ - name : Publish to GitHub Packages
44+ run : ./gradlew publish
45+ env :
46+ USERNAME : ${{ github.actor }}
47+ TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments