Skip to content

Commit

Permalink
ci: Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
osipxd committed Jul 8, 2024
1 parent 4febd34 commit a3bb5cd
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run Check
uses: eskatos/gradle-command-action@v2
with:
arguments: detektMainAll check
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
run: ./gradlew detektMainAll check

publish:
name: Publish
Expand All @@ -35,19 +35,19 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run Publish
uses: eskatos/gradle-command-action@v2
with:
arguments: publishAllPublicationsToGithubPackagesRepository
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
run: ./gradlew publishAllPublicationsToGithubPackagesRepository
env:
ORG_GRADLE_PROJECT_githubPackagesUsername: ${{ github.actor }}
ORG_GRADLE_PROJECT_githubPackagesPassword: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -63,22 +63,21 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
java-version: 17

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Run Publish
uses: eskatos/gradle-command-action@v2
with:
arguments: publishToMavenLocal
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
run: ./gradlew publishToMavenLocal

- name: Run Build
uses: eskatos/gradle-command-action@v2
with:
arguments: build
build-root-directory: samples/${{ matrix.sample }}
run: |
cd samples/${{ matrix.sample }}
./gradlew build

0 comments on commit a3bb5cd

Please sign in to comment.