Attempt at fixing publish #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: snapshot_release | |
| on: | |
| repository_dispatch: | |
| types: [ trigger-snapshot-release ] | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - support-system-message-transformer | |
| jobs: | |
| snapshot_release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| server-id: github | |
| server-username: GITHUB_ACTOR | |
| server-password: GITHUB_TOKEN | |
| - name: Override groupId to com.bridge | |
| run: | | |
| # Add an explicit <groupId>com.bridge</groupId> to the starter POM | |
| # (right after <artifactId>), so it no longer inherits dev.langchain4j | |
| sed -i '/<artifactId>langchain4j-spring-boot-starter<\/artifactId>/a\ <groupId>com.bridge</groupId>' \ | |
| langchain4j-spring-boot-starter/pom.xml | |
| - name: snapshot_release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Install the parent POM locally (non-recursive) so the starter can resolve it | |
| mvn -B -N install -DskipTests | |
| # Deploy only the starter submodule | |
| mvn -B -U --fail-at-end -DskipTests -DskipITs deploy \ | |
| -pl langchain4j-spring-boot-starter \ | |
| -DaltDeploymentRepository=github::https://maven.pkg.github.com/${{ github.repository }} |