Skip to content

Publish all artifacts from MacOS host #11

Publish all artifacts from MacOS host

Publish all artifacts from MacOS host #11

Workflow file for this run

name: Publish Release
on:
pull_request:
branches:
- main
release:
types: [ created ]
concurrency:
group: "release"
cancel-in-progress: false
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
jobs:
publish-release:
name: Publish Release
runs-on: macOS-latest
if: github.repository == 'MayakaApps/Kache'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Extract Kotlin version
run: |
echo "KOTLIN_VERSION=$(sed -rn 's/^kotlin[[:space:]]?=[[:space:]]?\"(.*)\"/\1/p' 'gradle/libs.versions.toml')" >> $GITHUB_ENV
- name: Restore Konan cache
uses: actions/cache/restore@v3
id: restore-cache
with:
path: ~/.konan
key: ${{ runner.os }}-konan-${{ env.KOTLIN_VERSION }}
- name: Publish
run: ./gradlew publishAllPublicationsToMavenCentralRepository