33 lines
		
	
	
		
			917 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			917 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Gitea Action Maven build
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     branches: ['master']
 | |
| 
 | |
| jobs:
 | |
|   build:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - name: Checkout the repo
 | |
|         uses: actions/checkout@v4
 | |
|       - name: Set up Maven
 | |
|         uses: stCarolas/setup-maven@v5
 | |
|         with:
 | |
|           maven-version: 3.9.9
 | |
|       - name: Set up JDK 21
 | |
|         uses: actions/setup-java@v4
 | |
|         with:
 | |
|           java-version: 21
 | |
|           distribution: 'oracle'
 | |
|           cache: 'maven'
 | |
|       - name: Build with Maven
 | |
|         run: mvn -B package --file pom.xml
 | |
|       - name: Publish to Gitea Packages
 | |
|         uses: gitea/actions/publish-package@v1
 | |
|         with:
 | |
|           token: c0e0d748a36706d620aeb402377a221504af0479
 | |
|           owner: ${{ github.repository_owner }}
 | |
|           repo: ${{ github.event.repository.name }}
 | |
|           package-name: spring-demo
 | |
|           package-version: ${{ github.sha }}
 | |
|           file: target/your-artifact.jar | 
