Skip to content

Commit

Permalink
Add build pipeline in publish.yml file (#13)
Browse files Browse the repository at this point in the history
* Update publish.ymlAdd build pipeline in publish.yml file

close #12

* Update build.yml
  • Loading branch information
Harsh3305 authored Jun 29, 2023
1 parent 28dff83 commit 2915f41
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches:
- 'master'
env:

VERSION: "0.0.1-SNAPSHOT"
USERNAME: ${{ secrets.OSSRH_USERNAME }}
TOKEN: ${{ secrets.OSSRH_TOKEN }}
jobs:
Expand All @@ -33,4 +33,4 @@ jobs:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build with Gradle
run: gradle clean build
run: gradle clean build
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,29 @@ env:
USERNAME: ${{ secrets.OSSRH_USERNAME }}
TOKEN: ${{ secrets.OSSRH_TOKEN }}
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
steps:
Expand Down

0 comments on commit 2915f41

Please sign in to comment.