Publish with Gradle #1
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: Publish with Gradle | |
| permissions: | |
| contents: read | |
| packages: write | |
| # this should only be triggered manually | |
| on: workflow_dispatch | |
| jobs: | |
| build: | |
| # run on windows to mimic local build | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| # checkout action hash for version 6.0.2 | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - name: Set up Java | |
| # setup-java action hash for version 5.2.0 | |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 | |
| with: | |
| # Gradle needs java 17 or above | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Publish with Gradle wrapper command | |
| # this run will do the publishing with the wrapper already provided in the repository | |
| run: ./gradlew.bat publish | |
| # these are the credentials we will need | |
| env: | |
| GITHUB_ACTOR: ${{ secrets.PACKAGES_USER }} | |
| GITHUB_TOKEN: ${{ secrets.PACKAGES_PAT }} | |
| NEXUS_USER: ${{ secrets.NEXUS_USER }} | |
| NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} |