[DESKTOP] Base for Mac App Store build
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
name: iOS release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
code_quality:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'corretto'
|
||||
cache: gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
- name: Unit tests
|
||||
run: ./gradlew testDebugUnitTest
|
||||
build_and_release:
|
||||
needs: code_quality
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'corretto'
|
||||
cache: gradle
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
|
||||
|
||||
- name: Cache KMP tooling
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.konan
|
||||
key: ${{ runner.os }}-v1-${{ hashFiles('*.versions.toml') }}
|
||||
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
|
||||
- name: Import certs
|
||||
uses: apple-actions/import-codesign-certs@v3
|
||||
with:
|
||||
p12-file-base64: ${{ secrets.MAC_CERTIFICATES_P12 }}
|
||||
p12-password: ${{ secrets.MAC_CERTIFICATES_PASSWORD }}
|
||||
|
||||
- name: Create Embedded Provision Profile
|
||||
run: |
|
||||
echo "$EMBEDDED_PROVISION" > desktopApp/embedded.provisionprofile.b64
|
||||
base64 -d -i desktopApp/embedded.provisionprofile.b64 > desktopApp/embedded.provisionprofile
|
||||
env:
|
||||
EMBEDDED_PROVISION: ${{ secrets.MAC_EMBEDDED_PROVISION }}
|
||||
|
||||
- name: Create Runtime Provision Profile
|
||||
run: |
|
||||
echo "$RUNTIME_PROVISION" > desktopApp/runtime.provisionprofile.b64
|
||||
base64 -d -i desktopApp/runtime.provisionprofile.b64 > desktopApp/runtime.provisionprofile
|
||||
env:
|
||||
RUNTIME_PROVISION: ${{ secrets.MAC_RUNTIME_PROVISION }}
|
||||
@@ -21,12 +21,13 @@ compose.desktop {
|
||||
mainClass = "com.kgurgul.cpuinfo.MainKt"
|
||||
|
||||
nativeDistributions {
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
|
||||
targetFormats(TargetFormat.Dmg, TargetFormat.Pkg, TargetFormat.Msi, TargetFormat.Deb)
|
||||
packageName = "CPU-Info"
|
||||
packageVersion = "1.3.0"
|
||||
|
||||
val iconsRoot = project.file("desktop-icons")
|
||||
macOS {
|
||||
bundleID = "com.kgurgul.cpuinfo"
|
||||
iconFile.set(iconsRoot.resolve("icon-mac.icns"))
|
||||
provisioningProfile.set(project.file("embedded.provisionprofile"))
|
||||
runtimeProvisioningProfile.set(project.file("runtime.provisionprofile"))
|
||||
|
||||
Reference in New Issue
Block a user