Skip to content

Commit e83df2d

Browse files
alexey-pelykhclaude
andcommitted
(chore) run staging dry-run on PRs to validate publication
Stage snapshot artifacts on PRs (with PR-{N}-SNAPSHOT version) to catch Gradle publishing/POM issues before merge, matching the pcre4j pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 26f5661 commit e83df2d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@ jobs:
4343
path: lib/build/outputs/aar/*-release.aar
4444

4545
- name: Stage snapshot artifacts
46-
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
47-
run: ./gradlew :lib:publishReleasePublicationToStagingDeployRepository -Puvccamera.version=main-SNAPSHOT
46+
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
47+
run: >
48+
./gradlew :lib:publishReleasePublicationToStagingDeployRepository
49+
-Puvccamera.version=${{ github.event_name == 'pull_request' && format('PR-{0}-SNAPSHOT', github.event.pull_request.number) || 'main-SNAPSHOT' }}
4850
4951
- name: Publish snapshot artifacts
5052
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}

0 commit comments

Comments
 (0)