From 94647a36a2be5cf2f3b7714274fff3060cb90d45 Mon Sep 17 00:00:00 2001 From: Justin Abrahms Date: Wed, 27 Apr 2022 16:06:27 -0700 Subject: [PATCH] publish snapshot versions on main merge --- .github/workflows/gradle.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 }}