migrate to new nexus publisher API. #115
Workflow file for this run
This file contains hidden or 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 dist | |
on: | |
push: | |
pull_request: | |
jobs: | |
linux-build: | |
name: build on macos-14 | |
runs-on: macos-14 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: set up JDK 22 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
java-version: 22 | |
# build or publish, depending on whether it is for release tags or not | |
- name: build (ONLY FOR NON-RELEASES) | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: ./gradlew --warning-mode all build | |
- name: publish (ONLY FOR NEW RELEASE TAGS) | |
if: startsWith(github.ref, 'refs/tags/') | |
run: ./gradlew --warning-mode all publishToMavenCentral dokkaHtml | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_CONTENTS }} | |
- name: upload build failure logs | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-failure-logs | |
path: | | |
compose-audio-controls/build/reports/ | |
compose-audio-controls/*.log | |
compose-audio-controls-midi/build/reports/ | |
compose-audio-controls-midi/*.log | |
- name: upload artifact | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: library-artifacts | |
path: | | |
compose-audio-controls/build/libs/*.jar | |
compose-audio-controls/build/outputs/aar/*.aar | |
compose-audio-controls-midi/build/libs/*.jar | |
compose-audio-controls-midi/build/outputs/aar/*.aar | |
app/build/outputs/apk/debug/*.apk | |
# Update API reference | |
# FIXME: we should probably publish compose-audio-controls-midi API too | |
- name: deploy to GitHub Pages | |
if: ${{ success() && startsWith(github.ref, 'refs/tags/') }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: compose-audio-controls/build/dokka/html |