Skip to content

Commit

Permalink
ci: Update CI config
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed May 17, 2024
1 parent 010c16d commit 68f66fa
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}

0 comments on commit 68f66fa

Please sign in to comment.