Add Gradle example to README
This commit is contained in:
		
							parent
							
								
									2f85cc5281
								
							
						
					
					
						commit
						203550b542
					
				
							
								
								
									
										29
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								README.md
									
									
									
									
									
								
							| @ -56,7 +56,7 @@ jobs: | ||||
|       - run: java -cp java HelloWorldApp | ||||
| ``` | ||||
| 
 | ||||
| Publising to an Apache Maven Repository: | ||||
| Publishing using Apache Maven: | ||||
| ```yaml | ||||
| jobs: | ||||
|   build: | ||||
| @ -91,6 +91,33 @@ jobs: | ||||
| 
 | ||||
| See the help docs on [Publishing a Package](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-apache-maven-for-use-with-github-packages#publishing-a-package) for more information on the `pom.xml` file. | ||||
| 
 | ||||
| Publishing using Gradle: | ||||
| ```yaml | ||||
| jobs: | ||||
| 
 | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
| 
 | ||||
|     - name: Set up JDK 1.8 | ||||
|       uses: actions/setup-java@v1 | ||||
| 
 | ||||
|     - name: Build with Gradle | ||||
|       run: gradle build | ||||
| 
 | ||||
|     - name: Publish to GitHub Packages | ||||
|       run: gradle publish | ||||
|       env: | ||||
|         USERNAME: ${{ github.actor }} | ||||
|         PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||||
| ``` | ||||
| 
 | ||||
| ***NOTE: The `USERNAME` and `PASSWORD` need to correspond to the credentials environment variables used in the publishing section of your `build.gradle`..***	 | ||||
| 
 | ||||
| See the help docs on [Publishing a Package with Gradle](https://help.github.com/en/github/managing-packages-with-github-packages/configuring-gradle-for-use-with-github-packages#example-using-gradle-groovy-for-a-single-package-in-a-repository) for more information on the `build.gradle` configuration file. | ||||
| 
 | ||||
| # License | ||||
| 
 | ||||
| The scripts and documentation in this project are released under the [MIT License](LICENSE) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user