name: Gradle Package on: push: tags: - '*' jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 16 uses: actions/setup-java@v1 with: java-version: 16 server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file - name: Build with Gradle run: ./gradlew build - uses: actions/upload-artifact@v2 with: name: Artifacts path: ./build/libs/ # The USERNAME and PASSWORD need to correspond to the credentials environment variables used in # the publishing section of your build.gradle - name: Publish to GitHub Packages and other Mavens run: ./gradlew publish env: BRANCH_NAME: ${{ github.ref }} RUN_COUNT: ${{ github.run_number }} REPO_NAME: ${{ github.repository }} USERNAME: ${{ github.actor }} TOKEN: ${{ secrets.GITHUB_TOKEN }} midnightcontrols_MAVEN: ${{ secrets.MAVEN_URL }} MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}