Skip to content

Commit e3cd3de

Browse files
committed
1.1.6 升级
1 parent 3054839 commit e3cd3de

File tree

6 files changed

+759
-14
lines changed

6 files changed

+759
-14
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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 }}

0 commit comments

Comments
 (0)