-
-
Notifications
You must be signed in to change notification settings - Fork 14
84 lines (72 loc) · 2.92 KB
/
desktop-macos-testflight-release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Desktop MacOS Testflight Release
on:
push:
tags:
- '*-desktop'
jobs:
deploy:
runs-on: macos-14
timeout-minutes: 40
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-gradle
with:
gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }}
- name: Import Mac App Distribution and Installer certificate
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.MAC_APP_DISTRIBUTION_INSTALLER_CERTIFICATE }}
p12-password: ${{ secrets.MAC_APP_DISTRIBUTION_INSTALLER_CERTIFICATE_PWD }}
- 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.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.RUNTIME_PROVISION }}
- name: Update Licenses file
run: ./gradlew desktopApp:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/resources/
- name: Create path variables
id: path_variables
run: |
tag=$(git describe --tags --abbrev=0 --match "*-desktop")
version=$(echo "$tag" | sed 's/-desktop$//')
name="FeedFlow-${version}.pkg"
path="desktopApp/build/release/main-release/pkg/${name}"
echo "TAG=$tag" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
echo "RELEASE_PATH=$path" >> $GITHUB_ENV
- name: Create Properties file
run: |
echo "is_release=true" >> desktopApp/src/jvmMain/resources/props.properties
echo "sentry_dns=$SENTRY_DNS" >> desktopApp/src/jvmMain/resources/props.properties
echo "version=$VERSION" >> desktopApp/src/jvmMain/resources/props.properties
env:
SENTRY_DNS: ${{ secrets.SENTRY_DNS }}
VERSION: ${{ env.VERSION }}
- name: Create PKG
run: ./gradlew packageReleasePkg -PmacOsAppStoreRelease=true
- name: Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: reports
path: |
**/build/compose/logs/*
- uses: Apple-Actions/upload-testflight-build@v1
with:
app-type: 'osx'
app-path: ${{ env.RELEASE_PATH }}
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}