Update publish.yml #2
This file contains 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: Package Publishing | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 22 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '22' | |
distribution: 'adopt' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in | |
# the publishing section of your build.gradle | |
- name: Publish to GitHub Packages | |
run: ./gradlew publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |