Merge pull request #561 from kennethshackleton/agp-8.7 #488
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: 'Publication' | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
publish: | |
name: 'Publish' | |
runs-on: ubuntu-latest | |
timeout-minutes: 120 | |
steps: | |
- name: 'Install system packages' | |
run: sudo apt-get install -y --no-install-recommends clang gcc make sed tcl | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: 'Gradle' | |
run: | | |
echo 'org.gradle.caching=false' >> gradle.properties | |
echo 'org.gradle.configuration-cache=false' >> gradle.properties | |
- name: 'Unit tests' | |
run: ./gradlew :selekt-android:testDebugUnitTest :selekt-java:test | |
- name: 'Build Selekt' | |
run: | | |
./gradlew clean \ | |
:OpenSSL:assembleArm64-v8a \ | |
:OpenSSL:assembleArmeabi-v7a \ | |
:OpenSSL:assembleX86 \ | |
:OpenSSL:assembleX86_64 | |
./gradlew :SQLite3:amalgamate | |
./gradlew assembleRelease | |
- name: 'Publish snapshot to OSSRH' | |
if: github.event_name == 'push' | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_USER_TOKEN_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USER_TOKEN_USERNAME }} | |
run: | | |
./gradlew \ | |
publishMainPublicationToSonatypeRepository \ | |
closeSonatypeStagingRepository | |
- name: 'Publish release to OSSRH' | |
if: github.event_name == 'release' && github.event.action == 'published' | |
env: | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHRASE }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_USER_TOKEN_PASSWORD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USER_TOKEN_USERNAME }} | |
run: | | |
./gradlew \ | |
-Prelease \ | |
publishMainPublicationToSonatypeRepository \ | |
closeAndReleaseSonatypeStagingRepository |