File tree Expand file tree Collapse file tree 2 files changed +47
-1
lines changed
Expand file tree Collapse file tree 2 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Auto Deploy 4.2 to the Maven Repository
2+ on :
3+ push :
4+ branches :
5+ - " 4.2"
6+ jobs :
7+ publish :
8+ runs-on : ubuntu-latest
9+ strategy :
10+ matrix :
11+ node_version : [ 18.x ]
12+ # os: [ubuntu-latest, windows-latest, macOS-latest]
13+ os : [ ubuntu-latest ]
14+ steps :
15+ - uses : actions/checkout@v1
16+ - run : echo ${{github.ref}}
17+ - name : Set up Repository info
18+ uses : actions/setup-java@v2
19+ with :
20+ java-version : ' 17'
21+ distribution : ' adopt'
22+ - name : Cache Maven Repository
23+ uses : actions/cache@v3
24+ with :
25+ path : ~/.m2
26+ key : ${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
27+ - name : Create Maven settings.xml
28+ # uses: actions/cache@v3
29+ env :
30+ MAVEN_USERNAME : ${{ secrets.MAVEN_USERNAME }}
31+ MAVEN_PASSWORD : ${{ secrets.MAVEN_PASSWORD }}
32+ run : |
33+ mkdir -p ~/.m2
34+ echo "<settings>
35+ <servers>
36+ <server>
37+ <id>snapshots</id>
38+ <username>${MAVEN_USERNAME}</username>
39+ <password>${MAVEN_PASSWORD}</password>
40+ </server>
41+ </servers>
42+ </settings>" > ~/.m2/settings.xml
43+
44+ # Step 4: 构建并发布到 Maven 私有仓库
45+ - name : Build and Deploy to Maven
46+ run : mvn clean deploy -q -pl "$(./changes.sh)"
Original file line number Diff line number Diff line change 33
44name : Java CI with Maven
55
6- on : [push ]
6+ on : [pull_request ]
77
88jobs :
99 build :
You can’t perform that action at this time.
0 commit comments