diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3ac81a9..f0c4a0f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,24 +16,22 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + distribution: 'temurin' + java-version: 17 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - name: Run Check - uses: eskatos/gradle-command-action@v1 - with: - arguments: check -xlint - distributions-cache-enabled: true - dependencies-cache-enabled: true + run: ./gradlew check -xlint - name: Run Detekt - uses: eskatos/gradle-command-action@v1 - with: - arguments: detektAll detektReleaseAll + run: ./gradlew detektAll detektReleaseAll publish: name: Publish @@ -43,25 +41,25 @@ jobs: steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 11 + distribution: 'temurin' + java-version: 17 - name: Get module name from tag id: get-module-name run: | tag=${GITHUB_REF#refs/tags/} - echo "::set-output name=result::${tag/-v*}" + echo "name=result::${tag/-v*}" >> $GITHUB_OUTPUT + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - name: Run Publish - uses: eskatos/gradle-command-action@v1 - with: - arguments: :${{ steps.get-module-name.outputs.result }}:publish - distributions-cache-enabled: true - dependencies-cache-enabled: true + run: ./gradlew :${{ steps.get-module-name.outputs.result }}:publish env: ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }} ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}