Skip to content

Commit

Permalink
Add build in publish.yml workflow (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh3305 authored Jun 30, 2023
1 parent 6874777 commit 750879d
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,33 @@ on:
env:
USERNAME: ${{ secrets.OSSRH_USERNAME }}
TOKEN: ${{ secrets.OSSRH_TOKEN }}
PRODUCT_URL: ${{secrets.PRODUCT_URL}}
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: gradle clean build
env:
VERSION: "0.0.1-SNAPSHOT"
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
Expand Down

0 comments on commit 750879d

Please sign in to comment.