Skip to content

Merge pull request #562 from kennethshackleton/gradle-8.11 #489

Merge pull request #562 from kennethshackleton/gradle-8.11

Merge pull request #562 from kennethshackleton/gradle-8.11 #489

Workflow file for this run

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