Mac App Store release #3
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: Mac Ap Store 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 18 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 18 | |
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 18 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 18 | |
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 }} | |
- name: Create PKG | |
run: ./gradlew packageReleasePkg -PmacOsAppStoreRelease=true | |
- uses: Apple-Actions/upload-testflight-build@v1 | |
with: | |
app-type: 'osx' | |
app-path: desktopApp/build/compose/binaries/main-release/pkg/CPU-Info-${{ github.event.inputs.version }}.pkg | |
issuer-id: ${{ secrets.IOS_APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.IOS_APPSTORE_KEY_ID }} | |
api-private-key: ${{ secrets.IOS_APPSTORE_PRIVATE_KEY }} |