Skip to content

Commit 1b83bf2

Browse files
ci: gate release deploy with verify and remove tag-build duplication
Ensure release tags run a verify step before deploy, and limit maven-build to main branch/PR checks to avoid duplicate tag-triggered build pipelines. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a6bcaec commit 1b83bf2

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/maven-deploy.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,29 @@ on:
66
- 'v*'
77

88
jobs:
9+
verify:
10+
name: maven verify
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Git Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
cache: maven
21+
java-version: '17'
22+
distribution: 'temurin'
23+
24+
- name: Verify with Maven
25+
run: |
26+
chmod +x ./mvnw
27+
./mvnw -B clean verify --file pom.xml
28+
929
deploy:
1030
name: maven deploy
31+
needs: verify
1132
runs-on: ubuntu-latest
1233

1334
steps:
@@ -29,7 +50,7 @@ jobs:
2950
- name: Deploy to Maven Central
3051
run: |
3152
chmod +x ./mvnw
32-
./mvnw clean deploy -DskipTests -B
53+
./mvnw -B clean deploy --file pom.xml
3354
env:
3455
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
3556
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

0 commit comments

Comments
 (0)