build dist #69
Workflow file for this run
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 dist | |
on: | |
create: | |
tags: | |
jobs: | |
linux-build: | |
name: build on linux | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v1 | |
with: | |
submodules: recursive | |
- name: apt update | |
run: | | |
sudo apt-get update | |
- name: set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: apt install | |
run: | | |
echo y | sudo apt-get install doxygen cmake ninja-build libasound2-dev libjack-jackd2-0 | |
- name: stupid NDK setup workaround for GitHub Actions | |
run: sudo mkdir -p /usr/local/lib/android/sdk/ndk && sudo chmod 777 /usr/local/lib/android/sdk/ndk | |
- name: setup gpg necessities | |
run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > '$SIGNING_SECRET_KEY_RING_FILE'" | |
env: | |
GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} | |
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | |
- name: rewrite build.gradle(.kts) to require signing | |
run: | | |
sed -i "s/signing {}/signing { sign(publishing.publications) }/" ktmidi/build.gradle.kts | |
sed -i "s/signing {}/signing { sign publishing.publications }/" ktmidi-jvm-desktop/build.gradle | |
sed -i "s/signing {}/signing { sign(publishing.publications) }/" ktmidi-native-ext/build.gradle.kts | |
- name: publish | |
run: | | |
./build-rtmidi.sh | |
./gradlew --warning-mode all build dokkaHtml publish | |
env: | |
USERNAME: atsushieno | |
GITHUB_TOKEN: ${{ secrets.MAVEN_PAT }} | |
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} | |
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
- name: upload build failure logs | |
if: failure() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-failure-logs | |
path: | | |
ktmidi/build/reports/ | |
ktmidi-jvm-desktop/build/reports/ | |
ktmidi/*.log | |
ktmidi-native-ext/*.log | |
ktmidi-jvm-desktop/*.log | |
- name: upload artifact | |
if: success() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ktmidi-artifacts | |
path: | | |
ktmidi/build/libs/*.jar | |
ktmidi/build/outputs/aar/*.aar | |
ktmidi-native-ext/build/bin | |
ktmidi-jvm-desktop/build/libs/*.jar | |
- name: deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.2 | |
with: | |
branch: gh-pages | |
folder: ktmidi/build/dokka/html |