Update to v0.2.1 #25
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: Build Project | |
on: | |
push: | |
branches: [ master, ver/* ] | |
pull_request: | |
branches: [ master, ver/* ] | |
workflow_dispatch: | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
name: Gradle Setup | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- uses: gradle/actions/wrapper-validation@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Gradle Information | |
run: ./gradlew project tasks dependencies | |
build: | |
runs-on: ${{ matrix.os }} | |
needs: setup | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
java-version: [11, 17, 21] | |
name: Build Java ${{ matrix.java-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java-version }} | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean assemble publishToMavenLocal | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: setup | |
name: Test Project | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Install Firefox | |
uses: browser-actions/setup-firefox@v1 | |
- name: Gradle Test | |
run: ./gradlew allTests | |
deploy: | |
runs-on: ubuntu-latest | |
needs: [build, test] | |
name: Deploy Dokka | |
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Build Dokka | |
run: ./gradlew clean dokkaHtml | |
- name: Deploy Dokka | |
run: bash dokka.sh ${GITHUB_SHA::7} | |
publish: | |
runs-on: macos-latest | |
needs: [build, test] | |
name: Publish to Repository | |
if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' }} | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
cache: 'gradle' | |
- name: Change Permissions | |
run: chmod +x ./gradlew | |
- name: Install Firefox | |
uses: browser-actions/setup-firefox@v1 | |
- name: Publish to Repository | |
env: | |
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
run: ./gradlew clean build publish |