Skip to content

Commit

Permalink
Add deploy snapshot to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRejeb committed Feb 20, 2024
1 parent 71b040d commit 595c933
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,29 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
uses: gradle/gradle-build-action@ce999babab2de1c4b649dc15f0ee67e6246c994f

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

- name: Run tests
run: ./gradlew ${{ matrix.target }}

deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
arguments: ${{ matrix.target }}
java-version: '17'
distribution: 'temurin'

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

- name: Deploy snapshot
env:
VERSION: 1.0.0-SNAPSHOT
run: ./gradlew publish

0 comments on commit 595c933

Please sign in to comment.