Prepare next development version #397
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: Snapshot | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- trunk | |
jobs: | |
publish-snapshot: | |
if: ${{ github.repository == 'MiSikora/laboratory' }} | |
name: Publish Snapshot | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.11.0 | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Configure JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 19 | |
- name: Cache Gradle Dirs | |
uses: actions/cache@v3.0.11 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: cache-gradle-${{ hashFiles('**/*.gradle', '**/gradle-wrapper.properties') }} | |
restore-keys: cache-gradle- | |
- name: Deploy Snapshot | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
run: ./gradlew -p library publish --no-daemon --no-parallel --stacktrace | |
- name: Build HTML Docs | |
run: ./gradlew -p library dokkaHtml --stacktrace | |
- name: Stop Gradle | |
run: ./gradlew --stop | |
- name: Publish Website | |
uses: mhausenblas/mkdocs-deploy-gh-pages@1.25 | |
env: | |
CONFIG_FILE: ./library/mkdocs.yml | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REQUIREMENTS: ./library/docs/requirements.txt |