File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Gradle Package
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ tags :
7+ - ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ submodules : ' recursive'
20+ - name : Set up JDK 17
21+ uses : actions/setup-java@v4
22+ with :
23+ java-version : ' 17'
24+ distribution : ' temurin'
25+
26+ - name : Build with Gradle
27+ run : ./gradlew build
28+
29+ - name : Gather version name from git describe
30+ id : version
31+ run : echo ::set-output name=version::$(git describe --tags --dirty)
32+
33+ # The USERNAME and TOKEN need to correspond to the credentials environment variables used in
34+ # the publishing section of your build.gradle
35+ - name : Publish to GitHub Packages
36+ run : ./gradlew publish
37+ env :
38+ GITHUB_USER : ${{ github.actor }}
39+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ VERSION : ${{ steps.version.outputs.version }}
You can’t perform that action at this time.
0 commit comments