Rename package #33
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
# written by NyCode (https://github.com/NyCodeGHG/bcrypt/blob/main/.github/workflows/ci.yml) | |
name: Gradle CI | |
on: [ push, pull_request ] | |
jobs: | |
gradleValidation: | |
name: Gradle Wrapper | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v2 | |
- name: Gradle Wrapper Validation | |
uses: gradle/wrapper-validation-action@v1 | |
build: | |
runs-on: ubuntu-latest | |
needs: gradleValidation | |
name: Build | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v2 | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
# Cache Gradle dependencies | |
- name: Setup Gradle Dependencies Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | |
# Cache Gradle Wrapper | |
- name: Setup Gradle Wrapper Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Build with Gradle | |
run: ./gradlew assemble | |
test: | |
runs-on: ubuntu-latest | |
name: Test | |
needs: build | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v2 | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
# Cache Gradle dependencies | |
- name: Setup Gradle Dependencies Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | |
# Cache Gradle Wrapper | |
- name: Setup Gradle Wrapper Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Run Tests | |
run: ./gradlew check | |
publish-docs: | |
runs-on: ubuntu-latest | |
name: Publish Docs | |
needs: test | |
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && !contains(github.event.commits[0].message, '[skip ci]') | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v2 | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
# Cache Gradle dependencies | |
- name: Setup Gradle Dependencies Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} | |
# Cache Gradle Wrapper | |
- name: Setup Gradle Wrapper Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Build Dokka Docs with Gradle | |
run: ./gradlew dokkaHtml | |
- name: Deploy Docs to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: build/dokka/html |