File tree Expand file tree Collapse file tree 6 files changed +759
-14
lines changed
Expand file tree Collapse file tree 6 files changed +759
-14
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+
19+ - name : Setup Java
20+ uses : actions/setup-java@v4
21+ with :
22+ distribution : ' temurin'
23+ java-version : ' 21'
24+
25+ - name : Cache Maven dependencies
26+ uses : actions/cache@v4
27+ with :
28+ path : ~/.m2/repository
29+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
30+ restore-keys : |
31+ ${{ runner.os }}-maven-
32+
33+ - name : Decode and set up Maven settings
34+ run : echo "${{ secrets.MAVEN_SETTINGS_BASE64 }}" | base64 --decode > $HOME/.m2/settings.xml
35+
36+ - name : Build with Maven
37+ run : mvn --batch-mode clean install
38+
39+ - name : Find built JAR
40+ id : find-jar
41+ run : |
42+ JAR_PATH=$(find target -name '*.jar' | grep -v 'original' | head -n 1)
43+ echo "JAR_PATH=$JAR_PATH" >> $GITHUB_ENV
44+
45+ - name : Upload JAR file
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : Ip2region Artifacts
49+ path : ${{ env.JAR_PATH }}
You can’t perform that action at this time.
0 commit comments