Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request & Master CI | |
# Controls when the workflow will run | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Run Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
server-id: github | |
- name: Make Gradle executable | |
run: chmod +x ./gradlew | |
- name: Unit tests | |
run: bash ./gradlew test --stacktrace | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0 | |
with: | |
arguments: build | |
- name: Make Dir | |
run: bash ./gradlew makeSrcDirs | |
- name: Generate MetaData | |
uses: bash ./gradlew generateMetadataFileForMavenJavaPublication | |
with: | |
arguments: build | |
- name: Generate Pom | |
uses: bash ./gradlew generatePomFileForArchivesPublication | |
with: | |
arguments: build | |
- name: Publish to Maven Local | |
uses: bash ./gradlew publishToMavenLocal | |
with: | |
arguments: build | |
- name: Publish | |
uses: bash ./gradlew publish | |
with: | |
arguments: build | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Package | |
path: build/libs |