Publish #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: Publish | |
on: | |
workflow_dispatch: | |
jobs: | |
publish-github: | |
runs-on: macos-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build | |
run: ./gradlew publishAllPublicationsToGithubRepository --scan -Dorg.gradle.parallel=false | |
env: | |
PUBLISHING: true | |
ORG_GRADLE_PROJECT_githubUsername: boswelja | |
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
publish-oss: | |
runs-on: macos-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build | |
run: ./gradlew publishAllPublicationsToOssRepository --scan -Dorg.gradle.parallel=false | |
env: | |
PUBLISHING: true | |
ORG_GRADLE_PROJECT_githubUsername: boswelja | |
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }} | |
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }} | |
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }} | |
upload-pages: | |
runs-on: macos-latest | |
needs: | |
- publish-github | |
- publish-oss | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Build | |
run: ./gradlew dokkaHtmlMultiModule | |
- name: Upload Pages Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "build/dokka/htmlMultiModule/" | |
deploy-pages: | |
runs-on: ubuntu-latest | |
needs: upload-pages | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |