diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 2a592df..54da0a6 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -37,6 +37,9 @@ jobs: run: echo "VERSION_SUFFIX=$(echo "${{ github.sha }}" | cut -c 1-7)" >> $GITHUB_ENV - name: Build run: ./gradlew build + - name: Publish to Maven + if: ${{ github.repository_owner == 'ModularMCLib' && env.PUBLISH == 'true' }} + run: ./gradlew publish - name: Rename Jars if: ${{ env.PUBLISH == 'true' }} run: for file in build/libs/*; do mv "$file" "${file/SHOT/SHOT+$(date --utc '+%Y%m%d-%H%M%S')-${{ env.VERSION_SUFFIX }}}"; done;