Fix issue with macos and proguard #5
Workflow file for this run
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: Desktop Release | |
on: | |
push: | |
tags: | |
- '*-desktop' | |
jobs: | |
# -------------------------------------- # | |
# TestFlight Deploy | |
# -------------------------------------- # | |
testflight-deploy: | |
runs-on: macos-14 | |
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@v3 | |
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 | |
echo "dropbox_key=$DROPBOX_API_KEY" >> desktopApp/src/jvmMain/resources/props.properties | |
env: | |
SENTRY_DNS: ${{ secrets.SENTRY_DNS }} | |
VERSION: ${{ env.VERSION }} | |
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }} | |
- 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 }} | |
# -------------------------------------- # | |
# Macos Build | |
# -------------------------------------- # | |
build-macos: | |
needs: testflight-deploy | |
runs-on: macos-14 | |
outputs: | |
release_tag: ${{ steps.path_variables.outputs.tag }} | |
timeout-minutes: 40 | |
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 }} | |
# Developer ID Application | |
- name: Import signing certificate | |
uses: apple-actions/import-codesign-certs@v3 | |
with: | |
p12-file-base64: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA_MACOS }} | |
p12-password: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD_MACOS }} | |
- 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}.dmg" | |
path="desktopApp/build/release/main-release/dmg/${name}" | |
echo "tag=$tag" >> $GITHUB_OUTPUT | |
echo "TAG=$tag" >> $GITHUB_ENV | |
echo "VERSION=$version" >> $GITHUB_ENV | |
echo "RELEASE_PATH=$path" >> $GITHUB_ENV | |
echo "ARTIFACT_NAME=$name" >> $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 | |
echo "dropbox_key=$DROPBOX_API_KEY" >> desktopApp/src/jvmMain/resources/props.properties | |
env: | |
SENTRY_DNS: ${{ secrets.SENTRY_DNS }} | |
VERSION: ${{ env.VERSION }} | |
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }} | |
- name: Create DMG | |
run: ./gradlew packageReleaseDmg | |
- name: Upload reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports | |
path: | | |
**/build/compose/logs/* | |
- name: Notarization | |
run: | | |
xcrun notarytool submit $RELEASE_PATH --apple-id $APPLE_ID_NOTARIZATION --password $NOTARIZATION_PWD --team-id $APPSTORE_TEAM_ID --wait | |
xcrun stapler staple $RELEASE_PATH | |
env: | |
APPLE_ID_NOTARIZATION: ${{ secrets.APPLE_ID_NOTARIZATION }} | |
APPSTORE_TEAM_ID: ${{ secrets.APPSTORE_TEAM_ID }} | |
NOTARIZATION_PWD: ${{ secrets.NOTARIZATION_PWD }} | |
RELEASE_PATH: ${{ env.RELEASE_PATH }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
path: ${{ env.RELEASE_PATH }} | |
retention-days: 1 | |
# -------------------------------------- # | |
# Windows Build | |
# -------------------------------------- # | |
build-windows: | |
# TODO: enable this again | |
if: false | |
needs: testflight-deploy | |
runs-on: windows-latest | |
timeout-minutes: 40 | |
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: Update Licenses file | |
run: ./gradlew desktopApp:exportLibraryDefinitions "-PaboutLibraries.exportPath=src/main/resources/" | |
- name: Create path variables | |
id: path_variables | |
shell: pwsh | |
run: | | |
$tag = $(git describe --tags --abbrev=0 --match "*-desktop") | |
$version = $tag -replace '-desktop$', '' | |
$name = "FeedFlow-${version}.msi" | |
$path = "desktopApp/build/release/main-release/msi/${name}" | |
"TAG=$tag" >> $env:GITHUB_ENV | |
"VERSION=$version" >> $env:GITHUB_ENV | |
"RELEASE_PATH=$path" >> $env:GITHUB_ENV | |
"ARTIFACT_NAME=$name" >> $env:GITHUB_ENV | |
- name: Create Properties file | |
shell: pwsh | |
run: | | |
"is_release=true" >> desktopApp/src/jvmMain/resources/props.properties | |
"sentry_dns=$env:SENTRY_DNS" >> desktopApp/src/jvmMain/resources/props.properties | |
"version=$env:VERSION" >> desktopApp/src/jvmMain/resources/props.properties | |
"dropbox_key=$env:DROPBOX_API_KEY" >> desktopApp/src/jvmMain/resources/props.properties | |
env: | |
SENTRY_DNS: ${{ secrets.SENTRY_DNS }} | |
VERSION: ${{ env.VERSION }} | |
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }} | |
- name: Create MSI | |
run: ./gradlew packageReleaseMsi | |
- name: Upload asset | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.RELEASE_PATH }} | |
name: ${{ env.ARTIFACT_NAME }} | |
retention-days: 1 | |
- name: Upload reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports | |
path: | | |
**/build/compose/logs/* | |
# -------------------------------------- # | |
# Linux Build | |
# -------------------------------------- # | |
build-linux: | |
# TODO: enable this again | |
if: false | |
needs: testflight-deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
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: 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_deb="FeedFlow-${version}.deb" | |
path_deb="desktopApp/build/release/main-release/deb/${name}" | |
name_rpm="FeedFlow-${version}.rpm" | |
path_rpm="desktopApp/build/release/main-release/rpm/${name}" | |
echo "TAG=$tag" >> $GITHUB_ENV | |
echo "VERSION=$version" >> $GITHUB_ENV | |
echo "RELEASE_PATH_DEB=$path_deb" >> $GITHUB_ENV | |
echo "RELEASE_PATH_RPM=$path_rpm" >> $GITHUB_ENV | |
echo "DEB_NAME=$name_deb" >> $GITHUB_ENV | |
echo "RPM_NAME=$name_rpm" >> $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 | |
echo "dropbox_key=$DROPBOX_API_KEY" >> desktopApp/src/jvmMain/resources/props.properties | |
env: | |
SENTRY_DNS: ${{ secrets.SENTRY_DNS }} | |
VERSION: ${{ env.VERSION }} | |
DROPBOX_API_KEY: ${{ secrets.DROPBOX_API_KEY }} | |
- name: Create RPM & DEB | |
run: ./gradlew packageReleaseDeb packageReleaseRpm | |
- name: Upload RPM | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.RELEASE_PATH_RPM }} | |
name: ${{ env.RPM_NAME }} | |
retention-days: 1 | |
- name: Upload DEB | |
uses: actions/upload-artifact@v4 | |
with: | |
path: ${{ env.RELEASE_PATH_DEB }} | |
name: ${{ env.DEB_NAME }} | |
retention-days: 1 | |
- name: Upload reports | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports | |
path: | | |
**/build/compose/logs/* | |
# -------------------------------------- # | |
# Github Release Deploy | |
# -------------------------------------- # | |
release-github: | |
# TODO: Restore | |
#needs: [build-linux, build-windows, build-macos] | |
needs: [build-macos] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
- name: List artifacts | |
run: ls -R | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
# TODO: Enable this again | |
# files: | | |
# *.dmg | |
# *.msi | |
# *.rpm | |
# *.deb | |
files: | | |
*.dmg | |
draft: true | |
tag_name: ${{ needs.build-macos.outputs.release_tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |