Update plugin org.jetbrains.kotlin.multiplatform to v2 #27
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 | |
on: | |
push: | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: macOS-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Fetch expanded history, which is needed for affected module detection | |
fetch-depth: '500' | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Decrypt secrets | |
run: release/signing-setup.sh ${{ secrets.ENCRYPT_KEY }} | |
- name: Build | |
run: | | |
./gradlew --stacktrace \ | |
assemble | |
- name: Clean secrets | |
if: always() | |
run: release/signing-cleanup.sh | |
deploy: | |
if: github.event_name == 'push' # only deploy for pushed commits (not PRs) | |
runs-on: macOS-latest | |
needs: [ build ] | |
timeout-minutes: 30 | |
env: | |
TERM: dumb | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Copy CI gradle.properties | |
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Decrypt secrets | |
run: release/signing-setup.sh ${{ secrets.ENCRYPT_KEY }} | |
- name: Deploy to Sonatype | |
run: ./gradlew publish --stacktrace | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
- name: Clean secrets | |
if: always() | |
run: release/signing-cleanup.sh |