diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 76742182..bdf8aa3c 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -9,9 +9,9 @@ name: Java CI with Gradle on: push: - branches: [ master ] + branches: [ master, main ] pull_request: - branches: [ master ] + branches: [ master, main ] permissions: contents: read @@ -32,3 +32,15 @@ jobs: uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee with: arguments: build + + + # 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 + uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee + with: + arguments: publish + env: + snapshot: 1 + USERNAME: ${{ github.actor }} + TOKEN: ${{ secrets.GITHUB_TOKEN }}