forked from Mirror/ollama4j
		
	Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 5. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
		
			
				
	
	
		
			58 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			1.8 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Release Artifacts to GitHub Maven Packages
 | 
						|
 | 
						|
on:
 | 
						|
  release:
 | 
						|
    types: [ created ]
 | 
						|
 | 
						|
jobs:
 | 
						|
  build:
 | 
						|
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    permissions:
 | 
						|
      contents: read
 | 
						|
      packages: write
 | 
						|
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v3
 | 
						|
      - name: Set up JDK 17
 | 
						|
        uses: actions/setup-java@v5
 | 
						|
        with:
 | 
						|
          java-version: '17'
 | 
						|
          distribution: 'temurin'
 | 
						|
          server-id: github
 | 
						|
          settings-path: ${{ github.workspace }}
 | 
						|
 | 
						|
      - name: maven-settings-xml-action
 | 
						|
        uses: whelk-io/maven-settings-xml-action@v22
 | 
						|
        with:
 | 
						|
          servers: '[{ "id": "${repo.id}", "username": "${repo.user}", "password": "${repo.pass}" }]'
 | 
						|
 | 
						|
      - name: Find and Replace
 | 
						|
        uses: jacobtomlinson/gha-find-replace@v3
 | 
						|
        with:
 | 
						|
          find: "ollama4j-revision"
 | 
						|
          replace: ${{ github.ref_name }}
 | 
						|
          regex: false
 | 
						|
 | 
						|
      - name: Find and Replace
 | 
						|
        uses: jacobtomlinson/gha-find-replace@v3
 | 
						|
        with:
 | 
						|
          find: "mvn-repo-id"
 | 
						|
          replace: github
 | 
						|
          regex: false
 | 
						|
 | 
						|
      - name: Import GPG key
 | 
						|
        uses: crazy-max/ghaction-import-gpg@v6
 | 
						|
        with:
 | 
						|
          gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
 | 
						|
          passphrase: ${{ secrets.GPG_PASSPHRASE }}
 | 
						|
      - name: List keys
 | 
						|
        run: gpg -K
 | 
						|
 | 
						|
      - name: Build with Maven
 | 
						|
        run: mvn --file pom.xml -U clean package -Punit-tests
 | 
						|
 | 
						|
      - name: Publish to GitHub Packages Apache Maven
 | 
						|
        run: mvn deploy -Punit-tests -s $GITHUB_WORKSPACE/settings.xml -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Drepo.id=github -Drepo.user=${{ secrets.GH_MVN_USER }} -Drepo.pass=${{ secrets.GH_MVN_PASS }} -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/ollama4j/ollama4j
 | 
						|
        env:
 | 
						|
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |