forked from yzl210/TeamProjectE
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.13 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Publish with Gradle
on:
push:
branches: [ '1.20.1' ]
env:
CACHE_REV: "1"
jobs:
publish:
runs-on: ubuntu-22.04
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
${{ github.workspace}}/build/
${{ github.workspace}}/.gradle/
key: "${{ runner.os }}-build-${{ env.CACHE_REV }}-${{ hashFiles('**/*.gradle*') }}"
restore-keys: |
${{ runner.os }}-build-${{ env.CACHE_REV }}-
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Publish Release
run: |
chmod +x ./gradlew && ./gradlew "-Pmaven.auth.username=${{ secrets.MAVEN_USERNAME }}" "-Pmaven.auth.password=${{ secrets.MAVEN_PASSWORD }}" publish --stacktrace