Skip to content

Commit

Permalink
Add Gradle example to README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Clark committed Dec 6, 2019
1 parent 2f85cc5 commit 203550b
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- run: java -cp java HelloWorldApp
```
Publising to an Apache Maven Repository:
Publishing using Apache Maven:
```yaml
jobs:
build:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 203550b

Please sign in to comment.